OTTAWA — Five agents and analysts at Canada's spy service are suing their bosses with allegations of homophobia, racism and Islamophobia, the latest high-profile accusations of bad behavior to hit Canadian security forces.

The group of employees filed a C$35 million ($27.7 million) lawsuit on Thursday against the Canadian Security Intelligence Service (CSIS), saying they had been bullied for more than a decade.

"CSIS is a workplace rife with discrimination, harassment, bullying and abuse of authority, in the which the tone set by management, namely to mock, abuse, humiliate and threaten employees, has permeated the workforce," said the lawsuit.

A vehicle passes a sign outside the Canadian Security Intelligence Service (CSIS) headquarters in Ottawa November 5, 2014. Chris Wattie / Reuters / File

Last November, the Royal Canadian Mounted Police offered an apology to female officers and civilian members and settled claims of harassment, discrimination and sexual abuse made in two long-running court cases.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

The Canadian armed forces have experienced similar issues for years. In 2015, after an investigation uncovered widespread sexual misconduct and hostility towards minorities and women, the new chief of the defense staff said such behavior "must stop now."

CSIS director David Vigneault said the agency took allegations of inappropriate behavior very seriously.

"CSIS does not tolerate harassment, discrimination or bullying under any circumstances," he said in a statement on Friday, while declining to comment on the specific allegations.

The office of Public Safety Minister Ralph Goodale said it stood by Vigneault's statement.

CSIS, which employs 3,300 people, has suffered a number of problems since it was created in 1984. Last November, a court declared it had illegally kept data collected during investigations and threatened sanctions.

Of the five employees who are suing the agency, three are Muslim, one is gay and one is black.

The gay agent, who has a Muslim partner, stated his manager sent him an e-mail in 2015 that said "careful your Muslim in-laws don't behead you in your sleep for being homo."

The group said superiors regularly made derogatory comments, including that all Muslims were "blood thirsty murderers" or "terrorists."

University of Ottawa professor Wesley Wark, one of Canada's leading security experts, said such comments might have been expected from the first generation of CSIS employees who should by now have largely retired.

"If such attitudes have persisted beyond the first generation that is truly a problem," he said, adding that "CSIS is a pretty young organization these days in terms of demographics."

Follow NBC Out on Twitter, Facebook and Instagram