PORTLAND — A man facing more than 20 years in federal prison has now been charged with assault on an officer after he punched a corrections officer at Cumberland County Jail after the maximum-security inmate finished showering, police said.

Two corrections officers were preparing to put handcuffs and shackles on Trezjuan Thompson, 29, of Lewiston, for the remainder of his one hour of recreation time out of his cell at 1 p.m. Sunday. Chief Deputy Naldo Gagnon said Thompson’s back was to the officers when he suddenly spun around and punched Officer Paul Abrol in the face, knocking him to the ground.

Abrol and Officer Tyrone Leslie struggled with Thompson and were able to restrain him, Gagnon said.

Abrol, who has been with the department for five years, was treated for injuries by the jail medical staff and later went to a hospital, where he was treated for a mild concussion, Gagnon said.

Thompson was convicted in federal court of running a drug trafficking ring, even while he was incarcerated, and arson, and was sentenced last month to 27 1/2 years in prison.

Federal prosecutors said Thursday that Thompson was part of a cocaine and crack cocaine ring in the Lewiston-Auburn area when he set fire to an apartment that he had previously shared with a co-conspirator in November 2009. He pleaded guilty to the charges last year.

Prosecutors said that while he was incarcerated after the fire he conspired to distribute crack cocaine, and for that purpose used phones at the Androscoggin County Jail and the Maine State Prison.

The office of the U.S. Attorney said that because of Thompson’s previous convictions for drug trafficking and assault and battery with a dangerous weapon, he was sentenced as a career offender.