(CNN) -- A human rights group urged Burundi to reverse a law that makes homosexuality illegal, saying it risks worsening the harsh treatment of gays in the eastern Africa nation.
In March, people in Burundi demonstrate in favor of a measure banning homosexuality. It became law in April.
The new law makes "sexual relations with persons of the same sex" illegal and punishable by up to two years in prison, Human Rights Watch said in a recently released report.
It was enacted just as the gay, lesbian and transgender community had started to mobilize and call for equal treatment, according to the organization.
"The government needs to listen to these voices to understand the harm it is doing to Burundians with its state-sanctioned discrimination," said Georgette Gagnon, Africa director for Human Rights Watch. "The government should rescind this law and instead work to promote equality and understanding."
Before the law, which was passed in April, some gays and lesbians already faced significant discrimination in Burundi, according to the organization.
Some had lost their jobs, others were beaten by parents and local youths, and others were evicted, according to the Human Rights Watch report, which cited accounts by the victims.
Numerous attempts to reach government officials were unsuccessful.
Homosexuality is illegal in most countries in the region, including in nearby Kenya and Uganda, where sodomy laws were introduced during colonialism.
Most African nations have revised those laws to include consensual sex among gay and lesbian couples and made the punishments tougher, according to Human Rights Watch.
"Half the world's countries that criminalize homosexual conduct do so because they cling to Victorian morality and colonial laws," said Scott Long, director of lesbian, gay, bisexual and transgender rights program for Human Rights Watch. "Getting rid of these unjust remnants of the British empire is long overdue."
The role religion plays in Africa has a lot to do with the ban, others say.
"It is wrong from a biblical standpoint, and most African countries are governed based on religious beliefs," said Olatunde Ogunyemi, a professor in Grambling, Louisiana.
"Christianity and Islam are the dominant religions in the continent, and in some cases, constitutions are based on religion, which justifies making it illegal."
South Africa's post-apartheid constitution bans discrimination against gays -- the first in Africa to prohibit discrimination on the grounds of sexual orientation.
Homosexuality is also illegal in other countries, including Ghana, Nigeria and Zimbabwe, according to Human Rights Watch.