A vintage WWII fighter plane crashed into the Hudson River Friday night — and the pilot’s body was pulled from the wreckage about three hours later.

The P-47 Thunderbolt suffered a possible mechanical failure at about 7:30 p.m. and went into the river near the Intrepid Museum at West 46th Street, cops said.

“I saw the plane flying really low and I was thinking ‘what is this guy doing?’ ” witness Frank Piazza, 44, told The Post. “Then it bounced two times and then it went straight under — I don’t think he made it.”

Horrified onlookers at the ­Waterside Restaurant in North Bergen, NJ, said the pilot, later identified as 56-year-old Bill Gordon of Key West, Fla., desperately tried to escape.

“He opened the cockpit but he couldn’t get out,” said Johnny Flores, 25. “When he tried to get out it started sinking really fast.”

Witness Joanne Stolfo, of Ridgewood, NJ, said, “It was a very solemn feeling because we knew we were watching someone die.”

Gordon’s body was recovered by NYPD scuba divers at around 11 p.m.

He had been flying in air shows, performing aerobatic maneuvers, for 25 years and was the lead pilot of a team that toured throughout the US and Central America, according to a bio on his webpage.

The one-seater left from Republic Airport in Farmingdale, LI, with another other vintage aircraft and a plane carrying a photographer taking promotional shots for this weekend’s air show at Jones Beach.

The Federal Aviation Administration said that the plane sent a distress call and went down about two miles south of the George Washington Bridge.

The aircraft was owned by the American Airpower Museum at Republic.

A spokesman for the museum, Gary Lewi, said the plane was doing a promotional shoot for this weekend’s air show at Jones Beach.

“It would appear that the aircraft suffered a mechanical problem,” Lewi said. “And [the pilot] elected to put it down in the Hudson.”

The other two other planes returned safely.

New Jersey State Police initially said the pilot was rescued with minor injuries, but later said it was a Good Samaritan swimmer who was trying to help.

Additional reporting by Amanda Woods and Joe Tacopino