RISHI Sunak has apologised to LGBT veterans after they were sacked or forced out of the military because of their sexuality.

The Prime Minister described it as an “appalling failure” of the British state after a report was published into the treatment of gay members of the armed forces.

It was illegal to be gay in the British military until 2000.

The LGBT Veterans Independent Review, led by Britain's first openly gay judge Lord Etherton, launched last year and heard evidence from 1145 veterans who were impacted by the ban.

Sunak said in the House of Commons on Wednesday: "Many endured the most horrific sex abuse and violence, homophobic bullying and harassment all while bravely serving this country.

READ MORE: John Nicolson calls out BBC for 'bizarrely' worded SNP headline

"Today, on behalf of the British state, I apologise."

Lord Etherton’s report said: “I recommend that the Prime Minister should deliver an apology in the UK Parliament on behalf of the nation to all those LGBT service personnel who served under and suffered from the ban (whether or not they were dismissed or discharged).”

The report also recommended an “appropriate financial award” should be made to veterans affected by the pre-2000 ban on homosexuality in the armed forces.

It said: “An appropriate financial award should be made to affected veterans notwithstanding the expiry of litigation time limits.

“The Government’s overall exposure should be capped at £50 million.”

Scottish veterans minister Graeme Dey also welcomed the report and the apology, stressing it was clear a “grave injustice” had been done to LGBT veterans.

Dey said: “The ban on homosexuality in the Armed Forces was abhorrent and should never have been in place.

“It’s clear from the many personal accounts within the review that a grave injustice was done. Lord Etherton’s recommendations and suggestions will go some way to addressing that.

READ MORE: Scottish Greens in 'transphobia' row as internal elections open

“While the Armed Forces are a reserved matter, and the recommendations within the review are all for the UK Government to deliver, the independent review contains two suggestions for Scotland.

“These are around diversity and inclusivity for healthcare and housing providers to ensure that veterans do not face any repeat of the homophobic policies they suffered in the Armed Forces.

“The Scottish Government is committed to supporting LGBT veterans and determining how to deliver on these suggestions is an important part of that support.”

The report ­– which comes more than 20 years after four servicemen and women, who were sacked for being gay, won a case in the European Court of Human Rights and overturned the ban ­– says many people faced invasive medical examinations, intrusive police investigations and in some cases, as recently as 1996, were sent to prison for their sexuality.

It also details how some veterans faced a complete loss of income, while others were deemed ineligible to claim their pension because of their dismissal.

Lord Etherton's report also recommended the restoration of medals that had to be handed back on dismissal or discharge, the clarification of pension rights, and the presentation of the veterans badge.