Passengers on board a JetBlue flight were forced to subdue the captain Tuesday after he began to exhibit "erratic behavior," including screaming "they're going to take us down," according to the passengers.

JetBlue Flight 191, which was headed from New York's John F. Kennedy International Airport to Las Vegas, made an emergency landing in Amarillo, Texas, due to what the airline called a "medical situation."

The captain reportedly ran up and down the aisles screaming, "Say your prayers," after his co-pilot locked him out of the cockpit, the New York Post reported.

Sources identified the captain to Fox News as Clayton Osbon, a JetBlue flight standards captain from Richmond Hill, Ga. He was taken into custody when the flight landed, but it wasn't immediately clear whether he faced any charges.

Osbon had ranted about Al Qaeda and a possible bomb onboard before being subdued, passengers said. Laurie Dhue, a former Fox News anchor who was on board the flight, said she also heard the captain mention "Afghanistan" and "Israel" during his rant.

More On This...

A flight attendant reportedly asked passengers to restrain the captain. Several, including a retired NYPD sergeant, came forward and pinned the man until the plane landed, the New York Post reported.

David Gonzalez, a former corrections officer who was headed to a security conference in Las Vegas, told Fox News that the captain had tried to break into the cockpit after being locked out, and he struggled with the flight attendants and appeared to want to open the plane’s side door.

Gonzalez said the pilot began yelling about Iraq and Iran. After a two-minute struggle, Gonzalez said he was able to subdue the pilot. Other passengers then stepped in and tied the pilot, he said.

An off-duty airline captain who just happened to be a passenger on the flight went to the flight deck and took over the duties of the subdued captain, the airline said in a statement. It didn't elaborate.

JetBlue said the captain was taken to a medical facility in Amarillo. Sources tell FoxNews.com that Osbon sustained "minor" injuries in the incident.

Initial reports do not suggest that Osbon has ties to counterterrorism.

Clayton Osbon's wife, Connye, defended her husband.

"There are several different sides to every story. Just keep that in mind," Osbon's wife, Connye Osbon, told ABCNews.com.

The FBI, FAA, TSA and local law enforcement are coordinating on investigating the incident, according to a TSA statement.