A helicopter with a flight student on board lost power and made an emergency landing Wednesday in a Lindenhurst neighborhood, narrowly missing rooftops and a maze of power lines, police and witnesses said.

The copter crash-landed in an intersection, but the pilot and his student-passenger scrambled from the wreckage with no injuries, authorities said.

The two-seat Robinson R22, nearly 29 feet long, only clipped a street sign — a fact that impressed neighbors and first responders at the scene.

“Somebody was with him today,” said Sherry Burgess, 60, who lives in a nearby apartment complex and saw the drama unfold. “How this young man put this helicopter down where he put it is nothing less than a true miracle. He is a hero today.”

Police identified the flight instructor as Joseph Lombardo, 26, of Lindenhurst, and the student as Ming Chen, 27, of China, who is staying with Lombardo. Both declined to be interviewed.

The light-duty copter was inbound to Republic Airport after a flying lesson when it made the emergency landing shortly before noon several miles south of the airport, officials said.

advertisement | advertise on newsday

The copter was flying at an elevation of about 700 feet when it lost power, said Frank D’Elia, vice president of operations at Academy of Aviation, the Republic Airport-based flight school where Lombardo has worked for more than a year.

Moments before the crash, Lombardo made a distress call to air traffic controllers at the Republic tower, according to an audio recording from LiveATC.net.

“Mayday, mayday, mayday — helicopter 4 lima echo with engine failure,” the pilot says.

A controller responds: “Are you able to make it to the field?”

“Negative, negative.”

Witnesses said the copter landed hard in the street, skidded and came to rest on its side at East Alhambra Avenue and Buena Vista Boulevard, south of Montauk Highway. Neighbors who rushed out of their homes couldn’t believe it when the two men climbed out.

“The student came out and was shaking like a leaf,” Burgess said. “I wrapped him up in a blanket.”

Laura St. Angelo, 54, said she saw the helicopter flying low near her house, then heard the engine sputtering.

“He came even lower and . . . the next thing, it completely stalled,” she said. “I saw [the pilot’s] face in complete fear. God bless him that he’s alive.”

St. Angelo said she later gave both Lombardo and Chen a hug.

advertisement | advertise on newsday

“I said please give me a big smile so I could always remember that instead of the scared look on your face,” she said she told Lombardo.

Greg Alvarella, who lives a few houses from the intersection, recalled hearing an unusual sound.

“I was laying in bed and heard the crash,” he said. “It sounded like someone dropped a pile of wood.”

D’Elia, from the flight school, said the copter was totaled but Lombardo’s quick thinking minimized the damage and protected the public.

“No injuries on the ground, no injuries in the aircraft — that’s what you hope for,” D’Elia said. “We’re anxious to see what could have gone wrong to have them have a loss of engine power.”

advertisement | advertise on newsday

The R22, made by the Robinson Helicopter Co. based in Torrance, California, is commonly used in flight training.

D’Elia said the Academy of Aviation had been leasing the copter from a Los Angeles-based company for more than a year. The damaged aircraft was loaded onto a flatbed truck Wednesday afternoon and towed to a shop, where it will be inspected by the Federal Aviation Administration, he said.

The FAA said in a statement it is investigating the incident.

According to FAA records, Lombardo was most recently issued his flight instructor certificate in June 2015 and his commercial pilot certificate in September 2014. Elia said Lombardo had served in the military.

All pilots regularly train for incidents like the one that happened Wednesday, said Chris Dancy, communications director for Helicopter Association International, an trade group based in Alexandria, Virginia.

“Loss of engine power is actually not that frequent, the engines are very reliable, but it does happen,” Dancy said, adding that when the helicopter loses power, it can still be maneuvered by the pilot and potentially set down safely.

“One of the advantages of the helicopter is you can bring it nearly straight down, so even a wide intersection can provide you with enough space.”