Terrified passengers prayed for their lives yesterday when an air hose exploded in the passenger compartment of a New York-bound American Airlines Boeing 767, forcing an emergency landing in Palm Springs.

“You didn’t know if this plane was going to be coming down,” said Peter Iorlano, 69, who was on the ill-fated jet.

Passengers heard a loud bang when a compressed air line in the floor burst — and they saw insulation shoot into the air soon after Flight 160 left San Diego at 11:33 a.m. with 124 passengers headed for Kennedy Airport.

The oxygen masks dropped down, the captain told people to stay in their seats, and the plane began a rapid descent from 31,000 feet to 10,000 feet.

Airline officials said the pilot made the descent because he feared the plane — the same model that crashed Oct. 31 in the EgyptAir disaster — might lose cabin pressure.

The pilot made an emergency landing about half an hour later at the Palm Springs airport.

A crew member and five passengers, including actor Abe Vigoda of “Barney Miller,” were treated for minor ear problems due to the rapid descent.

“It looked pretty bad,” said a shaken Vigoda, who came away with a nosebleed and pain in his ears.

“Everyone became somewhat scared and panicky.”

The flight attendants walked around the cabin, checking on the passengers.

“Their hands were shaking, but they were terrific,” said Toby Cohen, a retired teacher from Mill Basin, Brooklyn, who was aboard the flight.

Cohen’s son Bruce, who lives in Carroll Gardens and was with his dad, admitted he was “scared to death” — but said the pilot “should get a medal” for his cool handling of the tricky situation.

Though the Cohens traveled on to New York last night, many passengers grounded themselves after the ordeal.

John Larson, 46, a reporter for “Dateline NBC,” said, “It was scary. You’re wondering if the plane is going to lose pressure, if there’s going to be a fire, if it’s going to lose control. You mentally run through the whole list.

“You can tell everyone around was talking to their family members or praying.”