The pilot of a World War II-era plane from a Long Island museum died Friday night when the vintage plane crashed into the Hudson River, officials said.

The pilot, William Gordon, 56, of Key West, Florida, was identified early Saturday by the NYPD.

Officials said Gordon's plane crashed during an attempted emergency landing after its engine failed.

A major search aided by police boats and divers located the single-seat P-47 Thunderbolt fighter in the river near Edgewater, New Jersey, authorities said. The pilot's body was recovered late Friday night, an NYPD spokeswoman said at about 11 p.m.

An earlier erroneous tweet by New Jersey State Police had a male pilot being rescued with minor injuries and taken to a hospital.

The NYPD said the cause of the crash is being investigated by the FAA and National Transportation Safety Board.​

The P-47 Thunderbolt had been displayed at the American Airpower Museum at Republic Airport in Farmingdale, but it departed Friday with another vintage plane and a photo plane for a photo shoot, said museum spokesman Gary Lewi. It was supposed to perform in an air show this weekend, he said.

“Apparently the aircraft suffered an in-flight engine failure and the pilot put it into the Hudson,” Lewi said.

Jeffrey Nager said he and his wife, Carla, were on the terrace of their condo in Edgewater, New Jersey, when they heard a plane sputter, then saw it plummet.

Nager said the pilot attempted to make a controlled landing on the water, about a half-mile from shore.

“I saw an old-time plane essentially going down,” said Nager, a former Great Neck resident. “It was amazing to see. He came very close to the end of our complex. It looked like he was ditching the plane in the river, doing a Sully.”