OAKLAND (CBS SF) — An Aeromexico jet headed to San Francisco International Airport from Guadalajara was diverted to Oakland International Airport Thursday because of fog, with a subsequent hours-long delay leading to passenger desperation and two arrests.

Helicopter video showed two men being taken off the plane in handcuffs and placed into Alameda County Sheriff deputy patrol cars shortly before 3:00 p.m. At least one woman was taken off the plane to receive medical attention.

READ MORE: 49ers Deal With Jimmy Garoppolo's Playoff Highs And Lows

Later Friday evening, the sheriff’s office said the two detained passengers were released after speaking with authorities.

aeromexico detained passenger kpix

A man is detained by Alameda County sheriff’s deputies after being removed from Aeromexico flight 662. The man and a second detained passenger were later released. (CBS)

Passengers were stuck on Aeromexico flight 662 after it landed about 10:40 a.m. in Oakland. Aeromexico decided not to deplane the passengers at Oakland. Instead, passengers waited on the tarmac for more than four hours expecting to make it to SFO.

The long delay on the tarmac led to mounting frustration and desperation among the passengers who were not given food and hadn’t had any water since 11 a.m.

“Everybody started sweating. There was a man, 93-years-old behind us, no water,” said passenger Rosario Gonzales. “There is, like, at least 10 kids. They never offered water.”

“It was hot … little kids crying. Like, older women about to pass out,” said passenger Elizabeth Cervantes.

At least one passenger threatened to open the emergency exit and activate the evacuation slide. One passenger’s relative tweeted that passengers were being warned repeatedly not to try to open the plane doors.

READ MORE: Kicker Robbie Gould Shining In ‘Goulden’ Years With 49ers

“We were WARNED that if we left or attempted to open the doors that the police would be waiting and we would be arrested,” the tweet said.

The Alameda County Sheriff’s Office said the deteriorating situation aboard the plane prompted the pilot to call deputies, who arrived on scene around 2 p.m. Sheriff’s spokesman Sgt. Ray Kelly said several passengers had also called 911 to report being held on the plane against their will.

Kelly said the two passengers were detained because they had become unruly aboard the plane, including the one who had threatened to open an emergency exit. A woman was medically evacuated from the plane, receiving oxygen as she exited the plane.

At around 3:00 p.m., the plane was finally moved to a gate at Oakland airport where passengers were allowed to deplane. That option, the airport says, had always been available to them.

Passengers were eventually allowed to go through the immigration and customs check at Oakland International. “The question of how long [the passengers] sat on the tarmac lies with the airline,” said Kelly.

It was not clear why Aeromexico did not allow that process to happen earlier. Aeromexico did not immediately respond to inquiries.

Passengers were also being given the option of going through immigration and customs at Oakland airport or being bused to SFO.

MORE NEWS: UPDATE: Big Rig Driver Slammed Into Stalled Car, Triggering Fiery Fatal Richmond-San Rafael Bridge Crash

In 2017, the U.S. Department of Transportation expanded airline passenger protections, including establishing a four-hour hard time limit on tarmac delays for international flights of U.S. and foreign carriers. Airlines are also required to ensure passengers stuck on a plane are provided adequate food and water after two hours, as well as working lavatories and any necessary medical treatment.