CHARLOTTE, N.C. (AP) — Former Charlotte Mayor Patrick Cannon pleaded guilty Tuesday to a public corruption charge, ending a remarkable rise for a man raised by a single mother in one of the city’s poorest neighborhoods.

In a deal with prosecutors, Cannon pleaded guilty to one count of honest services wire fraud, which carries a sentence of up to 20 years in prison and a $250,000 fine.

“Yes sir, your honor, I am,” Cannon, a 47-year-old Democrat, told U.S. Magistrate Judge David Cayer when asked whether he was guilty.

Cayer accepted the plea. Cannon is out on bond, and his sentence will be decided at a later hearing before a U.S. district court judge. Prosecutors said Cannon’s continued release would help promote further cooperation with the ongoing FBI investigation.

“I am deeply sorry. I love Charlotte. It is the city of my birth,” Cannon said outside the courthouse. “Today I have acknowledged being guilty of accepting monies for constituent services, something that should never have been done while serving in elected office.”

Cannon was first elected to the council in 1993 at 26, becoming the youngest member in city history. He became mayor in November, replacing Anthony Foxx, who was named transportation secretary by President Obama.

By any measure, Cannon’s rise was as remarkable as his downfall was swift.

When he was 5, Cannon’s father was found dead of a gunshot wound outside a vacant school. Cannon was raised by his mother, who worked on a truck assembly line. They lived in public housing projects.

After high school, Cannon earned a degree in communications from North Carolina A&T State University.

As a young man, Cannon’s confidence and ambition caught the attention of some of the city’s biggest power brokers, including former Charlotte mayor and current Gov. Pat McCrory. Cannon used those political and social connections to build a business managing 25,000 parking spaces, most in the city’s central business district.

His March 26 arrest shocked many who had worked with him and shook a city that has prided itself on clean government. He resigned the same day.

The investigation began in 2010, when Cannon was a city councilman, after a tip from a local undercover officer about public corruption.

According to the federal criminal complaint, Cannon was recorded accepting more than $48,000 in cash, airline tickets, a hotel room and the use of a luxury apartment from FBI agents posing as real estate developers who wanted expedited permitting and zoning approvals. Cannon also is accused of soliciting up to $1 million in additional bribes from the undercover agents.

The agents paid Cannon on five occasions from January 2013 to February 2014, according to the complaint. On the last occasion, a private meeting in the mayor’s office, the agent handed Cannon a briefcase with $20,000 in cash.

The complaint says Cannon also accepted $12,500 from an agent to help him develop a feminine hygiene product called “Hers.” In exchange, Cannon offered to help the agent — posing as a business manager for a venture capital company — get permits to open a nightclub.

Cannon later had a discussion with the agent, apparently attempting to clarify that the money was strictly seed money for “Hers,” not payment for help opening the nightclub.