WASHINGTON - The State Department is cutting ties with the security contractor protecting the U.S. Embassy in Afghanistan after an investigation of allegations that guards engaged in lewd behavior and sexual misconduct at their living quarters.

The arrangement with ArmorGroup North America expires next summer and will not be renewed, State Department spokesman Mark Toner said yesterday. Work will begin immediately on finding another company to guard the Kabul embassy, he said.

Toner said ArmorGroup's history of failing to meet the terms of the $189 million contract was also a factor.

Susan Pitcher, a spokeswoman for Wackenhut Services, ArmorGroup's parent company, referred all questions to the State Department. ArmorGroup, based in McLean, Va., was awarded the Kabul embassy security work in 2007.

In early September, an independent watchdog group, the Project on Government Oversight in Washington, wrote Secretary of State Hillary Rodham Clinton a letter describing Lord of the Flies conditions that included threats and intimidation and scenes of ArmorGroup guards and supervisors in various stages of nudity at parties flowing with alcohol. It said the situation had led to a breakdown in morale and leadership that compromised security.

Several ArmorGroup guards and managers were fired or resigned shortly after the allegations surfaced.