NEWARK, N.J. — Hoboken’s former mayor was sentenced to two years in prison Thursday for accepting bribes from a federal informant posing as a corrupt developer.

Peter Cammarano III pleaded guilty in April to extortion conspiracy. Under terms of his plea agreement, Cammarano had faced up to 2½ years in prison. The maximum sentence for the crime is 20 years.

In brief remarks to U.S. District Judge Jose Linares, Cammarano expressed “profound regret” for his actions.

“I want to apologize for the disappointment I have caused,” he said. “I let down friends, my family and supporters and the people of the city of Hoboken. I truly believe I have no one to blame but myself. I will spend the rest of my days, whatever comes, making amends for my conduct in this case.”

At 32, Cammarano became Hoboken’s youngest mayor last summer and was considered a rising star in the Democratic Party. But three weeks after he took office he was arrested in a federal corruption and money laundering sting that swept up dozens of politicians and rabbis.

Cammarano admitted taking $25,000 from informant Solomon Dwek in exchange for promises to help Dwek build in Hoboken.

Cammarano was among three mayors, two state assemblymen and nearly two dozen public officials ensnared in the probe, along with prominent rabbis in Brooklyn and Deal, N.J. Cammarano resigned a week after his arrest.

Nearly half of the 44 people arrested last July have pleaded guilty, and two others — former state Assemblyman Daniel Van Pelt and former Jersey City Deputy Mayor Leona Beldini — were convicted at trial. Several other defendants face trials later this year.

Prosecutors released transcript excerpts of recordings in which Cammarano allegedly told Dwek that his political opponents would “get ground into powder” once he was elected.

The FBI said Cammarano was so confident about his supporters pre-election that he was caught on tape joking he could secure most of the votes of those born and raised in Hoboken even if he were “uh, indicted.”