A US domestic flight has made an emergency landing after the captain was restrained because of "erratic behaviour", officials say.

Passengers said the captain left the cockpit and began to rant about a bomb and threats from Iran and Al-Qaeda.

He was reportedly subdued when he tried to re-enter the cockpit, which had been locked by the co-pilot, officials said.

JetBlue flight 191 from New York to Las Vegas was diverted to Amarillo, Texas, after the incident.

The airline said the pilot in charge of the plane, which was carrying 135 passengers, decided to land at about 10:00 local time (16:00 GMT) after a "medical situation" involving the captain.

The flight touched down in Amarillo 10 minutes later, JetBlue said in a statement, and a new aircraft later arrived to take passengers on to Las Vegas.

Police and the FBI are investigating the incident.

Shocked and confused

Passengers recalled the confused scenes on board and said the captain had begun shouting about - according to varying accounts - a bomb, Iran, Iraq, Afghanistan and al-Qaeda.

On arrival in Las Vegas one passenger, David Gonzales, told US network ABC that he had grabbed the captain and put him in a headlock in an attempt to subdue him.

"I knew there were about 130 people on the plane... families, kids... and I thought, this is not going to happen on my plane," Mr Gonzalez said.

"We heard the word 'bomb'," passenger Heidi Karg told CNN. "We didn't know exactly what was going on."

Ms Karg said she heard the captain shout: "I need the code, gimme the code, I need to get in there."

According to Ms Karg, the co-pilot used the plane's public announcement system to call for someone to restrain the captain. A number of male passengers were able to wrestle him to the ground, she said.

One passenger, Grant Heppes, told the Associated Press that he saw the captain walk from the cockpit to the back of the plane. He was barred from going back in and then became disruptive.

"Once he got back to the front of the plane I heard him scream, 'Let me in!'" Mr Heppes said.

A statement by the Federal Aviation Administration said the co-pilot locked the captain out of the cockpit after he began to show "erratic behaviour".

Mr Heppes said many passengers were "shocked and confused".

"Nobody was very loud except for the people trying to help out. Everybody just standing up and not really sure what was going on. It was very hard to tell," he said.

Stretcher

Once on the ground in Amarillo the captain was taken to a local medical facility, JetBlue said.

According to Mr Heppes, the ambulance was parked beside the plane for about half an hour.

After the passengers had been taken off the plane, they were all interviewed by officials, Mr Heppes added.

One man at the airport, Shane Helton, told the Associated Press that emergency personnel were on the tarmac.

He said the captain was taken out on a stretcher and put in an ambulance.

In 2008, an Air Canada co-pilot suffered a mental breakdown during a flight from Toronto to London. The co-pilot was sedated and the flight made an emergency landing in Ireland. All passengers on board were safe.