SAN DIEGO — A former Navy SEAL has filed an internal complaint alleging the CIA bullied him for being gay during a work assignment in June in Afghanistan.

Brett Jones said he filed the complaint last week against the federal agency, saying he was forced to endure homophobic slurs and other inappropriate comments on June 11 in Afghanistan as a group of contractors and civil servants in the CIA’s Global Response Staff watched news of the US Supreme Court ruling that legalized same-sex marriage.

He also said he was abandoned and forced to walk in 120-degree temperatures without water.

Jones, the author of “Pride: The Story of the First Openly Gay Navy SEAL,” said he feared for his safety and returned home early from Afghanistan, where he was working as a CIA contractor, in a story first reported by the San Diego Union-Tribune.

The CIA told the newspaper it takes such complaints seriously but declined to comment on the case. CIA officials could not be reached for comment by the Associated Press late Wednesday.

“We take very seriously any allegation of sexual, racial or any other form of harassment and/or discrimination at CIA. We have a Zero Tolerance Policy against such behavior and CIA leadership is committed to holding all employees accountable for living and promoting this policy,” CIA spokesman Dean Boyd said in a statement to the Union-Tribune.

Jones told the AP that the CIA had contacted him and said they are investigating the complaint.

Jones said that during his time working in Afghanistan, people he was working with called him an anti-gay name, and he said they were defensive when he confronted them about it. Jones alleged in the complaint that his team later ditched him in 120-degree temperatures without water, making him walk partway back to their compound before they stopped to give him a ride.

“I heard a faint laughing followed by a distant, ‘He can walk back!’ The door closed and they drove out of sight,” Jones said in a statement sent to the newspaper, which obtained a copy of the complaint.

Jones also said a PowerPoint presentation shown during a staff briefing contained sexist, anti-gay and racist themes, and his call sign was changed from “Bad Monkey” to “Gay Gay.”

He said though the agency has come a long way in offering programs to accept gay people, there is still a lot of anti-gay sentiment among members of the special operations and intelligence communities.

“It’s crazy that it still exists. But it does. It really does,” he said.

He left the military in 2003 and has worked as a security contractor ever since. The 41-year-old from Huntsville, Alabama, said going public probably cost him his career, since he’s now been publicly identified as working for the CIA.

“I’ve wrestled back and forth about whether or not to go public,” he said. “The only reason I did is the hope that there is a chance, though I know it’s a slim one, that it will change some of the environment, some of the people.”

Rep. Adam Schiff (D-Burbank), the ranking member of the House Permanent Select Committee on Intelligence, the congressional committee that oversees intelligence communities, told the newspaper the accusations are serious and merit an investigation. He vowed to keep tabs on the case.