A gay former prison guard in Ottawa has been compensated with $98,000 (£63,000) in damages for homophobic harassment and discrimination in the workplace, after a decade-long struggle for his case to be recognised.

In July, gay former prison guard Robert Ranger received $45,000 (£29,000) compensation from The Ministry of Community Safety and Correctional Services for homophobic workplace discrimination, and another $53,000 (£34,000) because it took him several years to find a new job.

The decision was made by the Grievance Settlement Board, which handles complaints from Ontario public servants

It is the largest amount ever awarded for a breach of the Ontario Human Rights Code.

The Star Personal Finance reports the payout came as the end of a decade-long struggle for Mr Ranger.

Board vice-chair Deborah Leighton wrote in her decision: “The harassment and discrimination that created a poisoned workplace at the Ottawa-Carlton Detention (Centre) was vile.”

Mr Ranger started working at the Ottawa jail in 1998.

In December 2002, he filed a complaint with the board seeking $3.5 million in damages.

He claimed his employer did not prevent fellow employees and managers from discriminating against him, and this created a homophobic work environment.

As a result, Mr Ranger became depressed and suicidal, and went on disability for three years, from February 2002 to March 2005.

The hearing into the matter took over four and a half years.

A 2003 investigation into Mr Ranger’s allegations revealed he was repeatedly harassed with simulated sex acts, offensive language and derogatory emails expressing strong anti-gay opinions.

A fellow corrections officer also made sexual jokes at Ranger’s expense during a February 2002 training session.

In 2004, Deputy Minister John Rabeau Mr Ranger a letter of apology.

Based on Mr Rabeau’s letter and other evidence at the hearing, Ms Leighton concluded in a January 2010 decision that the persistence of the homophobic taunting amounted to discrimination based on sexual orientation.

She also noted that the ministry did not take any steps to address workplace discrimination.

All of the documentation suggested Mr Ranger was ready to return to work in the summer of 2003, as long as it was not at the Ottawa-Carlton Detention Centre.

However, Ms Leighton found the employer failed to accommodate him from April 2003 until shortly before he was offered a temporary position in early 2005. She counted this as a breach of both the Human Rights Code and the collective agreement.

When his temporary position concluded, Mr Ranger also did not get a full-time desk job in a probation and parole office until 2010, which was after Ms Leighton had ruled in his favour on the merits of the grievances filed.

He later got a counter position in the same office where he still works, while continuing to receive the same higher rate of pay as a corrections officer.

Ms Leighton agreed with the union that significant damages were due, but nowhere near the $3.5 million (£2.2 million) he was seeking.

She finally ordered the ministry to pay $98,000 (£63,000) to compensate Mr Ranger.

In August last year, University of Ottawa graduate Anna Reid MD officially became the first openly gay president of the Canadian Medical Association.

In October last year, a gay inmate of a Kentucky prison filed a lawsuit against a fellow prisoner, as well as the prison itself, claiming that he had part of his nose bitten off in an attack following days of harassment.