Gift Trapence, director of the Centre for the Development of People, which provides a safe space for gay people, answers reporters' questions in Lilongwe in 2011. File picture: Alexander Joe

Lilongwe - The United Nations' AIDS taskforce and human rights groups will launch a court battle against Malawi's laws criminalising homosexuality, in a rare challenge to rising anti-gay legislation in Africa.

The legislation has strained relations between President Joyce Banda's government and international donors, whose aid is desperately needed in the impoverished country.

UNAIDS, the Malawi Law Society and local rights groups will ask the high court on March 17 to overturn as unconstitutional laws banning same-sex relationships.

They will also challenge the convictions of three men jailed in 2011. Homosexuality carries a maximum prison sentence of 14 years in the southern African country.

“Our argument is that as long as same-sex relationships are consensual and done in private no one has business to get bothered,” law society spokeswoman Felicia Kilembe said.

Anti-gay sentiment and the persecution of homosexuals is rife in much of sub-Saharan Africa. Nigerian President Goodluck Jonathan this month provoked ire from the United States and the UN after signing a bill criminalising same-sex relationships.

UN Secretary-General Ban Ki-moon has said the Nigerian law could fuel prejudice and violence and risks obstructing an effective HIV/AIDS response.

In Malawi homosexuality became a contentious issue in 2009 when two men were arrested and charged with public indecency for getting married in a traditional ceremony.

They were later pardoned by the late President Bingu wa Mutharika after pressure from donors and the United Nations.