ACCRA (Reuters) - Ghana President John Mahama has decreed the early release of three men convicted over death threats against Supreme Court judges made during a panel discussion broadcast on a local radio station.

The case was part of a bid by authorities to ensure stability ahead of a presidential election in December and protect Ghana's image as a beacon of peace in West Africa.

Amid a dispute in June over voter roll revisions the Mahama supporters said on Accra-based Montie FM that they would hunt down and "finish" judges if they ruled in favor of the opposition.

They were convicted by the Supreme Court of contempt following a high-profile hearing and sentenced to four months in prison.

Mahama on Friday ordered them freed after they expressed remorse in a direct appeal, said a government statement distributed on Tuesday. The men had also apologized in court.

"The president reminds all concerned especially persons working in the media ... to guard against the use of intemperate language which has the potential of causing unnecessary tension especially in this election year," the statement said.

Politicians of all parties say it is vital to ensure peace during what is likely to be a closely-fought election between Mahama and opposition leader Nana Akufo-Addo. Religious leaders and traditional chiefs have reinforced the same message.

Senior opposition figures criticized Mahama's decision, arguing he freed the men early because they are ruling party activists.

(Writing by Matthew Mpoke Bigg; Editing by Joe Bavier and Richard Balmforth)