By Kwasi Kpodo

ACCRA (Reuters) - Authorities in Ghana have arrested three men for allegedly trying to buy arms for a planned coup in neighboring Ivory Coast, where a wave of violent attacks killed around 20 people last month, a local police chief said on Monday.

The Ivorian government has blamed allies of the country's former president Laurent Gbagbo, many of whom now live in exile in Ghana, of orchestrating the violence, which has raised fears of renewed unrest just a year after a civil war ended.

Deputy police commissioner Stephen Andoh-Kwofie said the men were arrested on Friday in the central coastal town of Cape Coast by undercover officers posing as arms dealers.

"We picked them up after they had bought AK-47 rifles from our men," he told Reuters, adding that all three had admitted they were mobilizing arms to overthrow the government of Ivorian President Alassane Ouattara.

"It appears they came to Ghana purposely to secure arms for a coup d'etat against the Ouattara government and must have been doing so in league with others," said Andoh-Kwofie.

Two of the men are Ivorian nationals who had been working in a hotel after registering as refugees. Police said one of the two Ivorians is a former soldier who was also carrying a Malian passport when arrested, and the third man is a Ghanaian who had lived in Ivory Coast for more than two decades.

PLOTTERS IN EXILE

Ivory Coast, the world's top producer of cocoa, was the economic engine of French-speaking West Africa before a political crisis sharply divided the country a decade ago, setting the stage for last year's conflict.

More than 3,000 people died in the violence, which erupted after Gbagbo refused to accept Ouattara's victory in elections in late 2010.

Gbagbo was captured during fighting in Abidjan in April last year and is now awaiting trial before the International Criminal Court, charged with crimes against humanity.

Most of his top political and military allies are either in detention in Ivory Coast or fled abroad at the end of the conflict, most to neighboring west African nations.

Ouattara's government launched a wave of arrests against suspected Gbagbo supporters after last month's attacks, which targeted police and army installations in the south and west.

Ghana, which had previously declined to act upon a series of international arrest warrants issued by Ivory Coast last year, arrested Justin Kone Katinan, Gbagbo's former budget minister, last month as he returned from a trip to South Africa.

He is currently in custody pending a court hearing on his extradition to Ivory Coast.

Gbagbo's supporters deny any involvement in last month's violence and accuse the Ivorian government of using the attacks as a pretext for a crackdown on the opposition.

(Writing by Joe Bavier; Editing by Richard Valdmanis and Roger Atwood)