The mayor of the largest city in the US state of North Carolina has resigned, hours after he was arrested by the FBI on corruption charges.

Newly elected Charlotte Mayor Patrick Cannon, 47, is accused of accepting more than $48,000 (£28,953) in bribes and gifts from undercover FBI agents.

He promised access to city officials in return, investigators said.

Cannon faces up to 20 years in prison and $1 million in fines if convicted on theft and bribery charges.

“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,” he wrote in his resignation letter.

According to a complaint filed in federal court, between January 17, 2013 and February 21, 2014, Cannon accepted payments from undercover FBI agents on five separate occasions.

In return, he offered to connect the agents to city officials responsible for planning, zoning and permitting.

Cannon, a long-time Democratic city counsellor elected mayor in November, accepted cash, airline tickets, a Las Vegas hotel room and the use of a luxury apartment from the FBI agents, who reportedly posed as real estate developers, according to the complaint.

Before his election as mayor, Cannon founded a car park company and was the long-time presenter of a radio chat show.

The corruption investigation reportedly began in August 2010 following a tip from an undercover local police officer.

At that time, Cannon held an at-large seat on the city council of Charlotte, a major centre for the US financial industry with a population of about 775,000.

Among the allegations against him, Cannon is accused of accepting a $12,500 cash payment from an undercover agent that Cannon said he planned to use to develop a feminine hygiene product called Hers.

In exchange, Cannon offered to help the agent obtain permits to open a nightclub.

Republican Governor Pat McCrory, himself a former mayor of Charlotte, said Cannon’s alleged behaviour was “inexcusable and cannot be tolerated”.

“My heart is broken for the city of Charlotte,” he said. “This is not the city that I know, served and love.”