A flight attendant deliberately started a fire in a plane bathroom and then extinguished the flames in front of fellow crew to act as a hero, according to authorities.

Johnathan Tafoya-Montano, an American Airlines employee, was on a flight from Dallas to Detroit when he deliberately set fire to a stack of paper towels in the rear plane toilet.

The 23-year-old hung around in the hall for a few minutes before pretending to discover the fire and alerting crew and putting it out with a fire extinguisher.

The captain notified air traffic controllers and was granted access for an emergency landing as the plane approached Detroit Metropolitan Airport, as reported by the Washington Post.

Court documents revealed that the FBI and the Wayne County Airport Authority Police Department investigated the incident and realised the fire had been started deliberately.

“After admitting that he had lied to the FBI and airport police, Tafoya-Montano provided several stories about how the fire accidentally started,” according to a criminal complaint filed in US District Court.

“Tafoya-Montano used a green colored Bic lighter to start the fire. Once the fire gained intensity, he immediately put the fire out.”

He had worked for the airline for more than a year when he was arrested on Tuesday. He has been released on bail.