WASHINGTON — Just weeks before Blackwater guards fatally shot 17 civilians at Baghdad’s Nisour Square in 2007, the State Department began investigating the security contractor’s operations in Iraq. But the inquiry was abandoned after Blackwater’s top manager there issued a threat: “that he could kill” the government’s chief investigator and “no one could or would do anything about it as we were in Iraq,” according to department reports.

American Embassy officials in Baghdad sided with Blackwater rather than the State Department investigators as a dispute over the probe escalated in August 2007, the previously undisclosed documents show. The officials told the investigators that they had disrupted the embassy’s relationship with the security contractor and ordered them to leave the country, according to the reports.

After returning to Washington, the chief investigator wrote a scathing report to State Department officials documenting misconduct by Blackwater employees and warning that lax oversight of the company, which had a contract worth more than $1 billion to protect American diplomats, had created “an environment full of liability and negligence.”

“The management structures in place to manage and monitor our contracts in Iraq have become subservient to the contractors themselves,” the investigator, Jean C. Richter, wrote in an Aug. 31, 2007, memo to State Department officials. “Blackwater contractors saw themselves as above the law,” he said, adding that the “hands off” management resulted in a situation in which “the contractors, instead of Department officials, are in command and in control.”