A Northwest Airlines flight from Las Vegas to Detroit was canceled after authorities said a pilot locked himself inside an airplane lavatory while screaming obscenities as passengers boarded.

Transportation Security Administration workers at McCarran International Airport responded Friday and noticed the pilot was "acting strange," Federal Aviation Administration spokesman Ian Gregor told The Detroit News.

"He entered the forward lavatory, locked the door and continued his animated conversation, but passengers who were boarding could hear the end of the conversation," Gregor said. "At some point he came out."

Gregor said the pilot, when confronted by a passenger, cursed at the passenger.

There were 180 passengers on the flight to Detroit Metropolitan Airport in Romulus. The flight was canceled after officials spoke with the captain. The name of the captain, who Gregor said was a veteran pilot, wasn't released.

Eagan, Minn.-based Northwest Airlines Corp. said in a statement that said the flight was canceled due to inappropriate language by a crew member. Northwest also issued an apology to its customers for the delay.

Passengers were placed on the next available fights, the Detroit Free Press reported.

The incident was under investigation by Northwest and the FAA.