Story highlights He resigns, saying such an action is in the best interest of the city

FBI agents arrest Charlotte Mayor Patrick D. Cannon on corruption charges

He allegedly took over $48,000 in cash and more between 2013 and 2014

The mayor's office declines comment

FBI agents on Wednesday arrested the mayor of Charlotte, North Carolina, for allegedly taking tens of thousands of dollars worth of bribes "in exchange for the use of his official position," the U.S. attorney's office said.

Patrick D. Cannon, 47, faces federal charges of theft and bribery concerning programs receiving federal funds, honest services wire fraud and extortion under color of official right, according to a press release from U.S. Attorney Anne Tompkins of western North Carolina.

The Charlotte mayor's office declined a CNN request for comment. However, CNN obtained a copy of Cannon's resignation letter, sent to City of Charlotte Manager Ron Carlee and City Attorney Bob Hagemann.

"I hereby give notice of my resignation from the position of the Mayor of the City of Charlotte, effective immediately. In light of the charges that have been brought against me, it is my judgment that the pendency of these charges will create too much of a distraction for the business of the City to go forward smoothly and without interruption," Cannon wrote in the letter.

"I regret that I have to take this action, but I believe that it is in the best interest of the City for me to do so."

Photos: Photos: Mayors in trouble Photos: Photos: Mayors in trouble Mayors in trouble – A reformer who led New Orleans through its worst disaster in modern history, Ray Nagin was convicted of taking hundreds of thousands of dollars in bribes and other favors from businessmen looking for a break from his administration. He was convicted of 20 of the 21 corruption-related counts against him and faces up to 20 years in prison. Prosecutors said Nagin, 57, was at the center of a kickback scheme in which he received checks, cash, wire transfers, personal services and free travel from businessmen seeking contracts and favorable treatment from his city. Hide Caption 1 of 6 Photos: Photos: Mayors in trouble Mayors in trouble – Charlotte, North Carolina, Mayor Patrick Cannon, 47, faces federal theft and bribery charges after being accused of taking tens of thousands of dollars "in exchange for the use of his official position," according to the U.S. Attorney's Office. Authorities launched a corruption investigation in 2010, using FBI agents posing as real estate developers and investors looking to do business in Charlotte, prosecutors say. Investigators allege that on five occasions Cannon took gifts from the agents, including airline tickets, a hotel room, a luxury apartment and more than $48,000 in collective cash. Hide Caption 2 of 6 Photos: Photos: Mayors in trouble Mayors in trouble – Marion Barry can be considered a symbol of political disgrace and political resurrection. There was the infamous 1990 drug conviction, a six-month jail sentence and a 2005 guilty plea to misdemeanor tax charges. He was stripped of virtually all executive power when Congress created a control board to oversee the city's financial operations after his drug conviction. Barry overcame the scandal and reclaimed his office in 1994. In 2009, while Barry was serving on the city council, U.S. Park Police arrested him on what they said was suspicion of stalking, but prosecutors later declined to pursue the case. Hide Caption 3 of 6 Photos: Photos: Mayors in trouble Mayors in trouble – Kwame Kilpatrick was sentenced to 28 years in prison in 2013 after he was convicted of two dozen federal charges, including racketeering, extortion and filing false tax returns. He was accused of using the mayor's office to enrich himself and associates. Detroit's mayor from 2002 until he resigned in 2008, Kilpatrick was the biggest target of a years-long Detroit City Hall corruption investigation that led to the convictions of two dozen people. Those convicted included several of his closest friends and former City Councilwoman Monica Conyers, the wife of U.S. Rep. John Conyers. Federal prosecutors alleged that Kilpatrick ran a criminal enterprise through the mayor's office to enrich himself through bid rigging and extortion, and using nonprofit funds for personal gain. Hide Caption 4 of 6 Photos: Photos: Mayors in trouble Mayors in trouble – In December, former San Diego Mayor Bob Filner was sentenced to 90 days in home confinement, three years' probation and fines totaling about $1,500 for assaulting three women while in office. The 71-year-old pleaded guilty in October to forcibly kissing or grabbing three women at campaign events or at City Hall -- one a felony false imprisonment charge, the other two misdemeanor battery charges. Filner entered the guilty plea under a deal with prosecutors. The three women were among 19 who accused him of offensive behavior during his tenure as mayor and as a congressman. Hide Caption 5 of 6 Photos: Photos: Mayors in trouble Mayors in trouble – Former Providence, Rhode Island, Mayor Vincent "Buddy" Cianci was convicted of corruption in the summer of 2002. He was mayor of Providence for parts of four decades before he was sentenced to five years and four months in prison as part of an FBI investigation into corruption at City Hall. Speaking in court before his sentencing, Cianci maintained his innocence, said he loved the city that he had dedicated himself to and had never meant to do anything wrong. Before announcing the sentence, U.S. District Judge Ernest Torres said this is "a sad day for Providence." He said Cianci had "rare vision and boundless energy" and had "played a great role in the renaissance of the city." A federal appeals court later vacated the prison sentence and ordered that he be resentenced. Hide Caption 6 of 6

First elected to City Council in 1993 -- when he was 26 and two years removed from graduating from North Carolina A&T State University -- the Democrat served through 2005, including the last four years as mayor pro tem.

Cannon, the president of a private parking business, spent four years out of office until being elected to City Council again in 2009. Between 2010 and 2013, he served as both a council member and mayor pro tem until his election as mayor in November 2013.

Federal authorities launched their corruption investigation in August 2010, using FBI agents who posed as commercial real estate developers and investors looking to do business in the North Carolina city, Tompkins' office said.

Investigators documented five separate occasions between January 2013 and February 2014 in which Cannon allegedly took more than $48,000 in cash, airline tickets, a hotel room and a luxury apartment from the undercover agents.

In the last instance, authorities say Cannon got $20,000 in cash in the mayor's office.

He allegedly accepted the largesse in exchange for returning the favor using his powers as a City Council member, mayor pro tem and, eventually, mayor.

Cannon appeared in court Wednesday and was released on bond, the U.S. attorney's office reported.

If convicted on all charges, he could be sentenced to as many as 50 years in federal prison and pay as much as $1.5 million in fines, officials said.