A Pennsylvania mayor faces decades behind bars after he was convicted Thursday of rigging city contracts in an effort to raise money for his political campaigns.

Allentown Mayor Ed Pawlowski was found guilty on 47 of 54 charges he faced, including conspiracy, bribery, fraud, attempted extortion and lying to the FBI. He faces up to 20 years in prison on each count.

Pawlowski remains free on bail until sentencing. A date has not yet been set.

The verdict forces Pawlowski out as mayor of Pennsylvania’s third-largest city. He had held the post for the past 12 years.

After the verdict, Assistant U.S. Attorney Anthony Wzorek told the Morning Call of Allentown that he and co-prosecutor Michelle Morgan were pleased with the outcome.

“This type of behavior is not acceptable,” Wzorek told the newspaper. “If they don’t have it of their own mind to think this is unacceptable, we will be watching, and the FBI will be doing investigations and will root out corruption.”

"This type of behavior is not acceptable. If they don’t have it of their own mind to think this is unacceptable, we will be watching, and the FBI will be doing investigations and will root out corruption." — Assistant U.S. Attorney Anthony Wzorek

Pawlowski was the architect behind a scheme to rig city contracts for legal, engineering, technology and construction work, aimed at boosting campaign funds for his statewide political ambitions, prosecutors said.

Lawyer Scott Allinson, who was a co-defendant, was also convicted of bribing Pawlowski to obtain legal work for his firm.

The jury "held Mayor Pawlowski accountable for selling his office to the highest bidder to fund his personal ambitions," U.S. Attorney Louis D. Lappen said in a statement.

Pawlowski's attorney, Jack McMahon, said he was "surprised and disappointed" by the verdict.

The mayor’s political consultants worked with the government and recorded hundreds of conversations with Pawlowski, many of which were played for the jurors. Several city workers and vendors who pleaded guilty testified against Pawlowski.

Meanwhile, McMahon argued soliciting campaign contributions from government contractors as a politician is not uncommon. He claimed that his client had been set up by the mayor’s political advisers, Mike Fleck and Sam Ruchlewicz, who secretly recorded Pawlowski that helped form the foundation of the prosecution’s case. Fleck pleaded guilty; Ruchlewicz wasn't charged.

The defense also sought to use the government tapes to its own advantage, playing for jurors a June 2015 conversation in which the mayor — unaware he was being recorded — complained about an engineering executive who'd been pressuring him for city work. "I'm not a pay-to-play guy," Pawlowski said on the recording.

Pawlowski, who won re-election in November while under indictment and began his fourth term in January, took the stand in his own defense and insisted he'd done nothing wrong.

The Chicago native was Allentown's economic development chief before taking office as mayor in January 2006. The city's moribund downtown was transformed on his watch, with valuable state tax incentives producing a new hockey arena, gleaming office buildings and upscale apartments.

Following the verdict, Pawlowski cried in the courtroom and his wife collapsed in a hallway.

The Associated Press contributed to this report.