More than 20 members of the Scottish parliament condemned the arrest of two gay men in Malawi who held a wedding ceremony.
The motion was signed by members of all main parties and called for parliament to condemn the "illegal and homophobic arrests" of Steven Monjeza and Tiwonge Chimbalanga.
The couple are currently on trial and may face up to 14 years in prison if convicted.
Dundee West MSP Joe FitzPatrick, who introduced the motion, said that although Scotland does not have an official foreign policy role, he felt that parliament should speak up.
He said: "Malawi is one of several African countries adopting increasingly homophobic attitudes, with Uganda having recently introducing anti-homosexual legislation including the death penalty and other repressive practices being introduced in Gambia.
"Apart from the human rights violations, and the discriminatory nature of the contraventions, it is likely that these retrograde and illegal moves will considerably set back efforts to combat the massive problem of HIV AIDS in the African sub-continent."
The motion also calls for an end to police harassment of HIV educators and human rights defenders in the country.
Lawyers acting for Monjeza and Chimbalanga have asked for a review of the country's homosexuality ban.
The couple were arrested on December 28th in Blantyre after holding a public ceremony. They are currently in custody in Chichiri prison.
Their legal team has asked for the case to be held before the Constitutional Court, but the presiding judge in Blantyre has said he will continue with the trial until the higher court accepts the case.
Judge Nyakwawa Usiwausiwa agreed that a constitutional review could take place.