DAKAR, Senegal - Heavy gunfire rang out Tuesday near the presidential palace in the tiny West African nation of Gambia, residents said, as the government denied a coup attempt was under way with the longtime ruler out of the country.

While the fighting appeared to be over by midday, witnesses said that soldiers had been dispatched to the airport and state media complex. Vehicles were not being allowed into the capital of Banjul, though government radio resumed broadcasting after briefly going silent amid the unrest.

"Contrary to rumors being circulated, peace and calm continue to prevail in the Gambia," read a statement signed by Kalidu Bayo, the secretary-general and head of the civil service.

Get Breaking News Delivered to Your Inbox

President Yahya Jammeh, who came to power in a 1994 coup when he was 29 years old, had left the capital of Banjul for France on Saturday, state media reported.

During his campaign for the last election in 2011, Jammeh vowed that only God - and not a vote or a coup - could shake his grip on power.

On Tuesday, soldiers linked to his presidential guard were believed to be involved in the fighting, according to witnesses who spoke on condition of anonymity for fear of reprisals.

There was a total blackout at Gambia's state radio and television and the deputy of the National Intelligence Agency, Louis Gomez, refused to comment on the reports of a possible coup attempt.

Gambia is a small former British colony surrounded by Senegal on both its northern and southern borders. Human rights activists have long criticized Jammeh's regime as repressive, charging it targets political dissidents, journalists, gays and lesbians.

Jammeh is one of Africa's most vocal anti-gay leaders and has previously threatened to behead sexual minorities found in his country. The U.S. government recently removed Gambia from a trade agreement in response to human rights abuses, including a law signed in October that imposes life imprisonment for some homosexual acts.

Jammeh also drew swift condemnation from activists in 2007 after he insisted that HIV-positive patients stop taking their antiretroviral medications, claiming he could cure them with an herbal body rub and bananas.