The UK government has announced that thousands of gay and bisexual men convicted of now-abolished sexual offences are to receive posthumous pardons.

It will mean formal pardons for those convicted over consensual same-sex relationships before homosexuality was decriminalised in the UK. Justice Minister Sam Gyimah said the move was "hugely important".

It honours a government commitment made after World War Two code-breaker Alan Turing was pardoned in 2013. The Bletchley Park code-breaker was convicted in 1952 of gross indecency with a 19-year-old man. He was later chemically castrated and died in 1954 after poisoning himself with cyanide.

Under the move - dubbed "Turing law" - deceased people who were convicted of sexual acts that are no longer deemed criminal will receive an automatic pardon.

Anyone living who has been convicted of such offences can already apply through the Home Office to have their names cleared through a "disregard process", which can remove any mention of an offence from criminal record checks.

However, those still alive will also receive a new, automatic statutory pardon - once their offences have been successfully deleted through the disregard process.

Mr Gyimah said it was "hugely important that we pardon people convicted of historical sexual offences who would be innocent of any crime today".

The Sexual Offences Act decriminalised private homosexual acts between men aged over 21 in England and Wales, in 1967.

The law was not changed in Scotland until 1980, or in Northern Ireland until 1982.