A man who caused a disturbance on a JetBlue flight from San Francisco to New York on Wednesday — causing the plane to divert to Salt Lake City — was jailed after an altercation with police and is facing federal charges for his alleged unruly conduct in the air.

According to court documents, 53-year-old Brian Duffy Regan took an Ambien, a prescription sleep-aid, and consumed alcohol on the flight. Passengers told law enforcement the man was “banging” on a TV screen and wouldn’t sit in his seat, and instead walked around trying to talk to other passengers. He also allegedly grabbed the face of a flight attendant who wouldn’t serve him more alcohol before calling her and another attendant “f------ idiots.”

When the man wouldn’t sit down, flight attendants enlisted the help of passengers to restrain Regan until the plane landed in Salt Lake City, according to court documents.

Federal court documents say Regan “stagg[ered]" off the plane and became aggressive when officers tried to seat him in a wheelchair to interview him. Court documents say officers tried to restrain Regan after he confronted an officers with “fists clenched,” and in the process took him to the ground, where he cut his head.

Officers then handcuffed Regan, after which point court documents alleged he wouldn’t walk or stand. While he was being placed and belted into a police vehicle, Regan allegedly spit in the face of one of the officers.

At some point during the confrontation, Salt Lake City police used a stun gun to subdue Regan.

Regan was booked into Salt Lake County jail for suspicion of assault on a police officer, interfering with an arresting officer, disorderly conduct and intoxication. He was charged Thursday in Utah’s U.S. District Court with one count of interference with a flight crew and is scheduled to appear in court Friday. State charges are pending.

U.S. District Court spokeswoman Melodie Rydalch said her office is looking into whether they can charge Regan for his alleged assault on Salt Lake City officers, in addition to what happened during the flight.

If found guilty of the interfering with a flight crew charge, Regan could be sentenced to a maximum of 20 years in prison.

After Regan left the plane, the JetBlue flight continued on to New York without further incident.