A flight from Sydney to San Francisco was diverted to Auckland after an American passenger’s racist, sexist, and homophobic outbursts.

A white man aboard United flight UA870 became annoyed that he was seated between two passengers of “Indian or Pakistani descent” who were talking to each other, passenger Anjou Kay told NBC Bay Area.

Forty minutes into the flight, the man stood up and threatened those passengers to keep them from talking to one another, passenger Neil Kay told TVNZ.

Flight attendants attempted to calm the man, and passengers pulled out their phones to record the incident. The man can be heard in one video saying to a female flight attendant: “If you guys treat people right on these things, you see two last names the same, don’t put someone else in the middle of them. I’m not yelling … you want to hear me f—— yelling. Do you know how cool it would be to have the airplane turned around because of me? You are going to do that? You do that? I’m being so impolite aren’t I? Fat a–.”

Another passenger told the NZ Herald that the man attempted to steal drinks during his rant.

According to Neil Kay, male flight attendants were called to try to make the man calm down, and he called them “terrible homophobic slurs.”

“The scary thing was just how quickly he got so upset. And the veins in his neck just were showing through. And that was just a concern. There was nothing that had been done that should have caused that kind of reaction.”

The flight was diverted to Auckland, NZ, but took 6 hours to reach that airport. Anjou Kay said, “Once the flight attendant came over, he turned to using gay slurs toward flight attendants. Every 15 minutes an incident for six hours. Everyone was concerned what’s the next one gonna be. … I felt tense; I had tears in my eyes because it was such a tense situation for so long.”

The man was taken into police custody in New Zealand but was denied entry into that country. Arrangements were made for him to take another flight to the United States.

United Airlines paid for hotel rooms for the passengers and they were delayed for 24 hours because of the incident.

Kudos to the professional @united flight crew on our flight from Sydney to San Francisco that was rerouted to Auckland to arrest this bigot. pic.twitter.com/Iwkf9ta8rS — Neil Kay (@neilmmmkay) January 1, 2017