Malawi President Bingu wa Mutharika has spared two gay men from serving a harsh 14-year sentence, CNN reported.

Tiwonge Chimbalanga, 33, and Steven Monjeza, 26, were charged with and found guilty of unnatural acts and gross indecency for participating in a symbolic engagement ceremony in December. In sentencing the pair, Magistrate Nyakwawa Usiwa-Usiwa imposed the maximum sentence allowed by law, saying he wanted to give the men a “scaring sentence” to “protect” the public.

“I will give you a scaring sentence so that the public be protected from people like you, so that we are not tempted to emulate this horrendous example,” he said.

State Department spokesman Philip Crowley called the harsh sentence “appalling.” British officials also protested the ruling.

Mutharika announced the pardon after meeting with United Nations Secretary General Ban Ki-moon.

White House Press Secretary Robert Gibbs said the White House was “pleased” to learn of the pardon.

Gibbs said the two men were not criminals and called for an end to the criminalization of sexual orientation and gender identity.

“We hope that President Mutharika's pardon marks the beginning of a new dialogue which reflects the country's history of tolerance and a new day for lesbian, gay, bisexual and transgender rights in Malawi and around the globe,” he added.

Mutharika has previously condemned being gay. “This is evil and bad before the eyes of God,” he said last month during the installation of a Roman Catholic Bishop in Blantyre. “There are certain things we Malawians just do not do.”

At least thirty-seven African countries currently outlaw being gay.

Two gay activists in Zimbabwe have been charged with insulting President Robert Mugabe after police stormed the offices of the Gays and Lesbians of Zimbabwe (GALZ) rights group.

The Malawi couple had been held in separate cells since their December 28 arrest.