An unruly passenger headed from Dulles International Airport in Virginia to Newark, New Jersey, on Thursday barreled into a cockpit door and began beating a flight attendant mid-flight, police said.

“This guy was in a full sprint, right up to the cockpit, hits the cockpit, starts banging on it,” Mike Egbert, one of the witnesses, told WNBC about the ordeal he went through while traveling aboard United Express Flight 4965.

The man, later identified by the police as 28-year-old Matthew Dingley, began beating up a flight attendant who tried to stop him, News 12 New Jersey reported.

At that moment, Egbert and eight other passengers tried to restrain Dingley for the rest of the flight.

After the flight landed in Newark shortly after 9 p.m., Port Authority Police officers boarded the flight on the ground to arrest Dingley, NJ.com reported.

Dingley then charged at the police officers, knocking them down the steps onto the airport tarmac. One officer broke four of his ribs while five other officers also suffered injuries. All of the officers and the flight attendant are expected to recover from their injuries.

A backup team of other officers came in to arrest Dingley, who faces multiple charges. Dingley faces charges of aggravated assault, resisting arrest, criminal trespassing, and interfering with transportation.

WNBC reported that the 28-year-old had previous run-ins with law enforcement before his Thursday arrest, including a 2016 arrest for leading the police on a chase in North Carolina. He was also convicted of DWI in New York in 2017.