A plane was forced to make an emergency landing at the Boston Logan International Airport on Wednesday after one of the pilots became incapacitated during the Canada-bound flight, officials said.

The Air Canada flight 7664 out of Newark, New Jersey, was forced to divert at 1:37 p.m. — just an hour after take off.

“A crew member was reported to having a medical emergency and aircraft was being flown by the co-pilot,” Massachusetts State Police told The Post.

Medical personnel transporting a patient on a stretcher near an Air Canada plane.The Air Canada flight 7664 out of Newark, New Jersey, was forced to divert just an hour after take off at 1:40 p.m.

The plane — a de Havilland Dash 8-400 — successfully landed at around 2 p.m., with ambulances swarming the runway and bringing a stretcher to the cockpit.

The pilot was brought from the plane to the ambulance within minutes of touchdown, CBS News reported.

A spokesperson for the Federal Aviation Administration told Boston 25: “Air Canada Flight 7664 landed safely at Boston Logan International Airport around 2 p.m. local time on Wednesday, June 24, after the crew reported a pilot medical emergency.”

Images from local outlets showed Massport Fire Rescue and Boston EMS crews surrounding the plane on the runway before it was towed to a gate. 

Boston EMS told CBS that the pilot was rushed to Massachusetts General Hospital.

The twin-turboprop PAL Airlines flight — operated by Air Canada — was traveling from Newark Liberty International Airport to the Halifax Stanfield International Airport, in Nova Scotia

No further details were provided on the pilot’s condition. 

Air Canada did not immediately respond to The Post’s request for comment.