A 12-year-old girl reported missing early Thursday morning has been found safe, South Salt Lake police said.

Officers located the girl Thursday just before noon. She had last been seen at her grandmother’s house at 4 p.m. Wednesday before she left to meet some friends.

By 10 p.m., her brother had messaged her on social media, and the girl said she was on her way home — but she never arrived.

According to police, the girl went to an apartment complex near her home and met a 12-year-old friend there, along with two other girls, age 12 and 16. They decided Wednesday night to sleep over at the house of one of the girls, in West Valley City.

The girl’s grandmother found the West Valley City location through a location app on the girl’s phone, and the grandmother gave that information to police at about 12:45 a.m. Thursday.

The mother of one of the girls drove the four girls to West Valley City, but the girl did not contact her grandmother to let her know about the sleepover, police said. One of the girls saw the missing girl’s picture on social media Thursday morning, and called police to arrange her safe return.

Police said community interest, and distribution of the girl’s photo and information in the media, helped resolve the case.

Correction: An earlier version said the girl had contacted her grandmother about the sleepover, because of incorrect information from the police.