Updated

The federal government has agreed to pay $175,000 to a senior Immigration and Customs Enforcement official who complained about lewd and "frat-house"-style behavior at the agency, according to a settlement notice filed Thursday.

The original complaint by James Hayes, head of the New York ICE office, touched off a series of allegations that ultimately led to the resignation of ICE Chief of Staff Suzanne Barr earlier this year.

Though the administration initially rejected his claims, the notice filed Thursday said the settlement will be carried out "within the next several days" -- and Hayes "will remain employed at ICE."

"We're very pleased with the result in the case and Mr. Hayes is very satisfied to put this matter behind him and continue with the good work of the agency," Hayes attorney Morris Fischer said in a brief statement.

Hayes had sued Homeland Security Secretary Janet Napolitano, claiming he was shoved aside in favor of female employees and then punished when he complained. He also accused Barr of fostering a "frat-house"-style environment.

His claims, coupled with those of other employees who submitted affidavits in the case, led to Barr's resignation. In the affidavits, one ICE employee claimed that in October 2009, while in a discussion about Halloween plans, the individual witnessed Barr turn to a senior ICE employee and say: "You a sexy (expletive)."

"She then looked at his crotch and asked, 'How long is it anyway?'" according to the affidavit.

In Barr's resignation letter, she nevertheless rejected the claims against her as "unfounded" but said she didn't want to distract from the agency's mission.

"In recent weeks, I have been the focus of unfounded allegations designed to destroy my reputation, but of greater concern however, is the threat these allegations represent to the reputation of this agency and the men and women who proudly serve their country by advancing ICE's mission," Barr wrote.