LONDON (Reuters) - Britain has granted posthumous pardons to thousands of gay and bisexual men who were convicted of sexual offences under laws which have since been abolished, the government said on Tuesday.

The mass pardon, which had been announced several months ago, became a reality when a new law received royal assent.

The policy is known as "Turing's Law" after the celebrated mathematician and World War Two codebreaker Alan Turing, who was stripped of his job and chemically castrated after being convicted of gross indecency in 1952 for having sex with a man.

Turing killed himself two years later, aged 41.

Homosexual acts were decriminalized in England in 1967 and it was not until 2001 that the age of consent for homosexuals was lowered to 16, the same as for heterosexuals.

"This is a truly momentous day. We can never undo the hurt caused, but we have apologized and taken action to right these wrongs," said Sam Gyimah, a junior justice minister, in a statement on Tuesday.

"I am immensely proud that 'Turing's Law' has become a reality under this government."

Lord John Sharkey, one of the people who campaigned for the pardons, said some 65,000 men had been convicted under the now-repealed laws, of which 15,000 were still alive.

Under the new law, anyone who was found guilty of consensual homosexual sex has their name cleared, and for those still living, the offences can be removed from any criminal record checks via a "disregard process".

(Reporting by Alistair Smout, editing by Estelle Shirbon)