Charlotte Mayor Patrick Cannon resigned on Wednesday following his arrest for alleged corruption and bribery.

Cannon has been mayor of the largest North Carolina city all of six months, reports The Associated Press. Prosecutors say he has been charged with public corruption and accepting over $48,000 in bribes from undercover FBI agents.

In Cannon's resignation letter given to city manager Ron Carlee, the now-former mayor said the charges "will create too much of a distraction" to keep at his position. "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."

Cannon was released on bond Wednesday and is facing up to 50 years in prison for the charges, which also include wire fraud and extortion, according to Reuters.

The FBI's investigation began in August 2010 after they received a tip about Cannon. During the investigation, the politician accepted five different bribes, which included the cash, airline tickets, a hotel room as well as use of a luxury apartment.

Cannon also attempted to get another $1 million from the undercover agents claiming to be real estate developers.