A terrifying morning unfolded in a Phoenix neighborhood when a small plane crashed into two homes just after takeoff, leaving residents shaken, three people injured, and federal investigators scrambling to piece together what went wrong.

Officials said the Piper PA-28 experienced a mechanical issue after departing from Deer Valley Airport on Wednesday morning. As the plane attempted to return, it went down in a residential area in north Phoenix just before 7:30 a.m. Witnesses said the aircraft first struck one home before ending up in the backyard of another.

The crash left three people hurt: a pilot instructor, a student on board the plane, and one person inside one of the homes. Fire officials said the instructor and student were taken to the hospital in stable condition with minor cuts and burn injuries. The homeowner was also hospitalized as a precaution and is expected to recover.

In an especially chilling detail, authorities said the plane hit a baby’s bedroom inside one of the houses. Thankfully, the child was not in the room at the time.

Capt. Todd Keller with the Phoenix Fire Department said the outcome could have been much worse.

“It hit two houses. Fortunately, everyone was okay,” Keller said. He added that early information suggests the aircraft clipped the first home before landing in the backyard of the second property.

The crash also forced four people and four dogs out of their homes as emergency crews responded to the wreckage. Hazmat teams were called in after fuel from one of the plane’s wings leaked into the attic of a house, creating another dangerous situation for first responders and residents.

Police shut down the street for hours while crews worked the scene and investigators prepared to begin their review.

Federal Aviation Administration officials are now expected to take over the investigation. Authorities say it could take time to determine exactly what caused the plane to go down, though a preliminary report could be released in the coming days.

For neighbors, the sight was almost impossible to believe.

“We go through the wash all the time riding our bikes, and to see a plane in the backyard of a house is wild,” Phoenix resident Germain Huval said.

Despite the destruction, relief quickly set in once it became clear no one had suffered life-threatening injuries. Red Cross spokesperson Georgi Donchetz said the displaced residents were holding up as well as could be expected under the circumstances.

“They seem to be in good spirits, considering everything,” Donchetz said. “Shows how important it is to, you know, step up for your neighbors and be there.”