“Getting the laws right is such an important part of ending the sort of discrimination that we have seen.”

The UK has announced plans to spend over five million in their attempt to encourage Commonwealth countries to reform archaic laws that discriminate against women and the LGBTQ community.

Home Secretary Amber Rudd revealed the news during the Commonwealth Heads of Government Meeting (CHOGM) in London.

“The anti-LGBT laws in some Commonwealth countries are a legacy of Britain’s colonial past,” said Rudd. “The UK Prime Minister made clear on Tuesday that we have some deep regrets about Britain’s historical legacy of anti-gay laws across the Commonwealth.”

In 37 countries in the Commonwealth, being LGBTQ is still punishable by jail time, with many of the country’s leaders using laws imposed by Britain to persecute minorities.

Related: Petition calling on Commonwealth countries to decriminalise gay sex gets over 100,000 signatures. 

Rudd made it clear to supporters of the Kaleidoscope Trust that “we recognise our social responsibility, as well as being the right thing to do, to promote LGBT equality in the UK and in the Commonwealth.”

She added: “We’re going to stand ready to support any Commonwealth member wanting to reform their outdated legislation that makes discrimination on the grounds of sexual orientation or gender identity possible.

“I’m pleased to announce we will provide £5.6m for a programme to support LGBT and gender equality, working with oranisations including the Kaleidoscope Trust, the Royal Commonwealth Society, the Human Dignity Trust and Sisters for Change to support the reform of the laws.

“Getting the laws right is such an important part of ending the sort of discrimination that we have seen.”

Earlier this week, Prince Harry and Meghan Markle said they will put LGBTQ issues at the front of their royal duties.

The couple – who are due to marry next month – spoke to fans at the Commonwealth Youth Forum on 18 April, an event in which worldwide speakers gathered to discuss issues surrounding LGBTQ rights.

Markle reportedly spoke with passion at the event, making it clear that LGBTQ people were entitled to “basic human rights”.

Jacob Thomas – winner of a Queen’s Young Leaders award for helping reduce the suicide rate within Australia’s LGBTQ community – said: “Miss Markle said, and these were her exact words, that this is a basic human rights issue, not one about sexuality.”

He continued: “Prince Harry said that what was so amazing was that five or ten years ago we wouldn’t have been having this conversation and how incredible it was that we now were. He said he would put the issue at the forefront of his work.”

Kenyan LGBTQ activist, Jonah Chinga, added: “Both Prince Harry and Miss Markle said they would put LGBT issues at the front of their work.”

Theresa May also expressed deep regret for Britain’s archaic discriminatory laws during her PM speech on 17 April.

“Across the world, discriminatory laws made many years ago continue to affect the lives of many people, criminalising same-sex relations and failing to protect women and girls,” she said.

May acknowledged that the anti-gay laws were “put in place” by her own country, and said “they were wrong then, and they are wrong now.”

“As the UK’s Prime Minister, I deeply regret both the fact that such laws were introduced, and the legacy of discrimination, violence and even death that persists today.

“As a family of nations we must respect one another’s cultures and traditions. But we must do so in a manner consistent with our common value of equality, a value that is clearly stated in the Commonwealth charter.”

Related: Boris Johnson promises Tom Daley he’ll raise LGBTQ rights with Commonwealth. 

She continued: “Recent years have brought welcome progress. The three nations that have most recently discriminated same-sex relationships are all Commonwealth members, and since the heads of government last met the Commonwealth has agreed to accredit its first organisation for lesbian, gay, bisexual and transgender people.

“Yet there remains much to do. Nobody should face persecution or discrimination because of who they are or who they love. And the UK stands ready to support any Commonwealth member wanting to reform outdated legislation that makes such discrimination possible.”

In response to Theresa May’s speech, UK Black Pride stated: “As a co-signatory to the All Out petition demanding ‘Theresa May Say Sorry’ UK Black Pride are celebrating the news the UK Prime Minister has expressed regret for the exporting of homophobia by the UK through these colonial laws, still existing in 36 Commonwealth nations, criminalising love between those of the same-sex.

“UK Black Pride is committed to developing and strengthening our work with our siblings across the Commonwealth to ensure grass roots activists have the space to change these laws, so we can all live freely and openly.”

Related: The UK has a responsibility to defend the rights of LGBTQ people in the Commonwealth.