New South Africa’s new president, Julius Malema, has signed into law a bill to allow the country’s first gay and lesbian president to be sworn in as soon as Monday.
The measure also allows for a referendum on same-sex marriage.
The bill was introduced on Monday by Malema and passed by a wide margin in parliament.
Malema’s victory comes as South Africa is still grappling with a high death toll from the deadly Ebola outbreak that has killed more than 3,400 people since the country opened its borders to aid workers in January.
But his victory came on the heels of a new anti-corruption commission that was established in the wake of the deadly outbreak to combat corruption and graft in government.
It is expected to be a major test for Malema in his first 100 days in office.
The opposition party of opposition leader Julius Malena is seeking to block the bill, saying it is a move to legitimize homosexuality.
He has promised to fight the bill in court.
The new law gives Malema the authority to appoint the president, who will also have the power to dissolve parliament and set the date of elections, as well as to dissolve the national assembly.
It also allows the president to nominate a vice president and an opposition party leader for cabinet posts.
The law provides that parliament could vote to remove the president if it decides to appoint someone who does not agree with the appointment.
It was passed on a narrow vote in parliament on Monday after the ruling African National Congress party, which Malema founded, blocked the bill.
The ANC says the bill legitimizes homosexuality.
The party also accused the government of “anti-Christian racism” by including the law in its election manifesto, which it said was a blatant attack on the nation’s religious traditions.
In addition to Malema as president, the bill also makes the president’s position permanent and extends his term of office.
Malena was elected president in April 2015 after being elected as an independent in 2015.
The African National Party, a Christian party, is also seeking to nullify the new law.
The United Nations has condemned the bill as discriminatory and has called on Malema to revoke it.
The UN said the bill “could effectively undermine the very concept of democracy, a pillar of the African nation.”
The African Union has also condemned the law.
Malmases victory was cheered by the gay rights community in South Africa, which said it was “a great day for equality and the dignity of all people.”
But the African Christian Democratic Party, an influential gay rights group, also condemned Malema.
“There is no place in our community for hate,” the party said in a statement.
“This is a historic day for the LGBT community in the South African nation and we are thrilled by this outcome.
The South African parliament is the only body that has the power, the authority and the responsibility to decide on the legitimacy of our president and the appointment of the president.”