An American Airlines flight from San Jose to Dallas was diverted to Phoenix Tuesday afternoon because of an unruly passenger, the airline confirmed.

The flight was diverted at around 1 p.m. and responding Phoenix police at Sky Harbor International Airport were told that a 26-year-old passenger who appeared to had been intoxicated was disruptive and had to be restrained.

One passenger tweeted a photo that showed a law enforcement official on the plane. Christine Merritt wrote that the unruly passenger had been "threatening to flight attendants making 'finger guns'" and "being belligerent." Another passenger helped to restrain the person, she added.

Trying to get to Dallas and emergency stopped in Phoenix! @americanair what a situation! pic.twitter.com/iY4XPBOUYL — christine merritt (@chrisjenmerritt) October 20, 2015

San Jose-resident Robert Schulz was on the flight and helped restrain the unruly passenger.

Schulz said the passenger was very drunk before the flight took off from San Jose and was demanding drinks before the plane was airborne.

The passenger also was getting up every five minutes to go to the bathroom and would not put his seatbelt on, Schulz said, adding the man was yelling and counting very loudly.

Flight 2232 had 96 passengers and a crew of five on the plane. Passengers continued on to Dallas and landed at 6:42 local time.

Meanwhile, the disruptive passenger was sent to a local hotel with plans to catch a flight on Wednesday because the airline did not want the person to be prosecuted, Phoenix police said.

The development comes two days after a Los Angeles Southwest flight from Los Angeles to San Francisco turned around for an emergency landing after a passenger was said to have choked a woman in front of him for reclining her seat.

The FBI said that person was detained for questioning based on the allegations, though no arrest had been made.