In August 2007, Blackwater's project manager in Iraq threatened to murder a State Department official who was investigating the company and who'd found substantial evidence of misconduct, according to a New York Times report based in part on documents from the investigation.

That official was then ordered to leave the country by American embassy officials, who took Blackwater's side in the disagreement. The incident occurred just weeks before Blackwater contractors opened fire on Baghdad's Nissour Square, killing over a dozen Iraqi civilians.

Here's the timeline:

August 1, 2007: A State Department team arrives in Baghdad to review Blackwater and its $1 billion contract to protect American diplomats in Iraq. The two lead investigators are Jean C. Richter and Donald Thomas Jr.

August 2-19, 2007: The investigators discover plenty of misconduct by Blackwater and its employees:

Blackwater guards were holding alcohol-filled parties with women in their rooms — where they were also keeping automatic weapons and ammunition.

Four drunk Blackwater guards took a $180,000 armored vehicle to a party, then crashed it into a concrete barrier.

Meanwhile, other armored vehicles used to protect diplomats were poorly maintained.

A subcontractor was using migrant workers from other countries as guards at Blackwater's compound — while living in terrible conditions, including sleeping three to a room, without a bed.

August 20, 2007: A security officer with the American Embassy in Baghdad meets with Richter, and tells him that Richter's been accused of "inappropriate behavior."

August 21, 2007: Richter and the embassy security officer meet with Daniel Carroll, Iraq project manager for Blackwater.

According to a memo Richter later wrote to the State Department, Carroll tells Richter "in a low, even tone of voice," "that he could kill me at that very moment and no one could or would do anything about it as we were in Iraq."

Richter later wrote, "I took Mr. Carroll's threat seriously. We were in a combat zone where things can happen quite unexpectedly, especially when issues involve potentially negative impacts on a lucrative security contract."

August 23, 2007: An embassy official sticks up for Blackwater and tells the two investigators to get out of Iraq immediately.

August 31, 2007: Richter, now back in the US, writes a memo to the State Department condemning Blackwater for creating "an environment full of liability and negligence." From the Times article:

"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."

September 16, 2007: Blackwater officials traveling through Nisour Square kill 17 Iraqi civilians, including a 9-year-old boy.

2009: Charges against five Blackwater guards for the Nisour Square killings are dismissed in US court.

Present day: Four of those Blackwater guards are currently standing trial in Washington, DC, in another trial for the Nisour Square killings.

The fact that Blackwater appeared to have legal immunity for the Nisour Square killings, and other incidents, is considered a significant part of why Iraq declined to sign the Status of Forces Agreement for some US troops to remain after 2011. That's particularly relevant today, as the Iraqi government is struggling to fight an insurgency led by the Islamic State of Iraq and the Levant (ISIS). It's not clear whether Iraq would have had an easier time fighting ISIS if US troops were still in the country.