WASHINGTON (CNN) -- FBI agents temporarily deployed to Iraq received an average of about $45,000 in excessive overtime because they billed the government for 16 hours a day throughout their 90-day assignments, according to a Justice Department audit.

Justice Department Inspector General Glenn Fine released the audit on Thursday.

The audit, released Thursday by Inspector General Glenn Fine, found the agents routinely submitted the overtime with the blessing of their managers from 2003 through 2007. The report says the excessive overtime totaled $7.8 million.

"The FBI inappropriately permitted employees to regularly claim overtime for activities that are not compensable as work, such as time spent eating meals, exercising more than 3 hours per week, and socializing," the report said. The socializing included going to movies and cocktail parties.

The FBI promptly responded to the report, acknowledging the overtime policy was designed to encourage FBI employees to volunteer for Iraq duty, but should not have been used and has now been corrected.

The 88-page report documenting the overtime issues found the FBI had initially approved the policy of paying for 16-hour days because conditions were harsh, there were few recreational opportunities and employees were always "on call."

But the audit said that violates federal pay guidelines.

The FBI admitted that "a flawed system was allowed to develop and remain in place too long," but it also sought to explain how the practice started.

"Early in the conflicts in Afghanistan and Iraq FBI managers traveled to those war zones and saw first hand the challenges of a 24/7 threat environment. FBI employees lived with sniper attacks, mortar fire, and roadside bombs as part of their daily work environment. They attempted to adapt a long established domestic pay system for domestic law enforcement to unprecedented wartime assignments for FBI personnel."

FBI agents in Iraq perform a variety of duties, according to the bureau's Web site. Agents interview suspected terrorists captured by the military; gather intelligence; collect evidence from crime scenes like car bombs or mass graves; and investigate crimes committed by Americans against Iraqis, as well as those that Iraqis commit against their fellow citizens.

The inspector general's report said overtime pay was less excessive for FBI personnel in Afghanistan. The report also found that somewhat less excessive overtime was paid to agents from other Justice Department agencies who were sent to Iraq, including deputy marshals, and ATF and DEA agents.