A man has pleaded guilty to a federal arson charge, after setting light to a Seattle gay bar on New Year’s Eve.

According to attorney Jenny Durkan, on New Year’s Eve 30-year-old Musab Mohammed Masmari poured gasoline in a stairwell at gay nightclub Neighbors, before lighting it.

Over 750 people were inside the club at the time, but the blaze was tackled by a patron with a fire extinguisher, and no one was harmed.

Masmari was captured on CCTV during the attack, and was arrested on February 1, as he attempted to flee the US.

He was initially charged in state court, but the case was taken over by federal prosecutors, and earlier this week he plead guilty to a charge.

The Seattle Times reports that under the plea agreement, federal prosecutors agreed to recommend a prison sentence of five years along with defence attorneys, though the maximum penalty is 20 years.

Masmari had previously drawn police attention over the past year for erratic behaviour, but no motive was revealed.

According to court documents, a friend of Musmari contacted the FBI to warn he “may be planning some terrorist activity”, and that on a number of occasions in emails he had expressed his “distaste for homosexual people”, saying he thought “they should be exterminated”.

Detectives have said the emails are “evidence pertinent to hate crime.”

His sentencing is scheduled for July 31.