Utah Police
Three people were killed and two others were injured in a shooting near an elementary school outside of Salt Lake City, Utah, June 6, 2017. In this photo, police cars sit outside Mountain View High School where multiple students were stabbed in Orem, Utah, Nov. 15, 2016. Getty Images

A man open fired on a woman and children inside a car Tuesday afternoon near an elementary school in Sandy, Salt Lake County, Utah, police authorities said. Three were killed, including the suspect, and two others injured during the shooting.

Sgt. Jason Nielsen of the Sandy City Police Department said that both adults and juveniles were involved in the incident. Authorities did not release the names or identities of the victims, but said that the two others injured were transported to a nearby hospital and one of them was in a critical condition.

"There's another juvenile male who's been transported to the hospital in critical condition and one juvenile female transported in stable [condition]," Nielsen said.

Read: Tesla News: Utah Court Denies Direct Sales, Stock Price At All Time-High

The shooting took place around 4 p.m. EDT Tuesday outside a residential area near the Brookwood Elementary School, according to Sandy police. The school was on lockdown till 5:04 p.m. EDT, according to the tweets on the Canyon School District page.

"Because the incident occurred after school had let out for the afternoon, many students found shelter in neighboring homes and businesses," Canyons District wrote on Twitter.

The school let out its students around 3:35 p.m. EDT, and the incident occurred soon after that. The school also acted as a reunification point for families after the incident.

Authorities said investigators were trying to confirm the relationships between the people involved as the incident reportedly resulted from domestic dispute. Police were not yet sure what could have caused the dispute.

Sgt. Nielsen also said it was not confirmed if the gunman shot himself or anyone else involved in the incident possessed a gun or a weapon.

"Preceding this event, what appears to have took place is a good Samaritan saw a female with two juveniles, stopped to help them, to transport them out of the area. During that time, the suspect actually rammed the good Samaritan's vehicle, bringing it to a stop in the roadway," said Sgt. Nielsen.

"[The] suspect exited his vehicle and [began] shooting," he added.

A resident in the area named Colby Corbett was in his backyard when the incident occurred. He was waiting for his 8-year-old son to return home from school when he heard around 20 to 30 gunshots within a few seconds.

"I was panicking bad," Corbett said. "I thought it was like a gun battle."

Officers have been investigating and interviewing witnesses following the incident, and were expected to be at the scene of the shooting for most of the night.

"My concern was when I realized the shooting was right here on this little hill behind me. There's an elementary school just down this hill, and my fear was 'Were there little kids walking home?'," Andrea Workman, another resident in the area, said.

"It could've been much worse. It already is tragic. I could've been so much worse with all these children walking home," she added.