WOODBURY - A captain on a JetBlue flight out of John F. Kennedy Airport was tackled and restrained by passengers this morning after a bizarre outburst mid-flight, witnesses say.

It was about three hours into a flight bound for Las Vegas when the captain burst out of the cockpit and attempted to open a locked bathroom door. He then walked to the back of the plane and began talking and whispering with passengers, according to witnesses. Some say he mentioned Afghanistan and Iraq, while other passengers say they heard him say the word "bomb." The captain then tried to get back into the locked cockpit, and that's when passengers say he began screaming and kicking the cockpit door. The Federal Aviation Administration (FAA) says the co-pilot had locked the captain out due to his "erratic behavior." Witnesses say the captain was tackled and restrained by six or seven passengers. The plane was diverted to Amarillo, Texas.

In a statement, JetBlue blamed the outburst on a "medical situation." The airline says, "Another Captain, traveling off duty, entered the flight deck prior to landing at Amarillo, and took over the duties of the ill crew member once on the ground." Officials say each passenger was interviewed by authorities once they got off the plane. The captain, whose identity has not been released, was hospitalized in Amarillo, but his current condition was not made available. Several agencies are investigating, including the FBI and the Transportation Security Administration (TSA).

Passenger video taken aboard plane: