Senators Barack Obama and John McCain have both criticized private security contractors in Iraq and Afghanistan, while they've also acknowledged that they don't see a way to guard government officials without the services of companies like Blackwater.

Obama has long advocated for increased accountability of private security contractors. In February 2007 -- seven months before Blackwater contractors killed 17 Iraqi civilians in Baghdad’s Nisour Square -- he introduced legislation to clarify contractors’ legal status and create an FBI unit to investigate contractor misconduct. The bill never came to a vote, but in the days after the Nisour Square shooting, Obama introduced a more modest amendment simply requiring closer tracking of contractors. McCain also voted for the amendment, which passed unanimously in September 2007.

Though the candidates don’t have kind words for security contractors, both have opposed calls to remove contractors from Iraq. "Here's the problem: we have 140,000 private contractors right there," Obama said in March. "So unless we want to replace all of or a big chunk of those with U.S. troops, we can't draw down the contractors faster than we can draw down our troops."

"I'd like it [the U.S. military to guard State Department officials in Iraq] but we don’t have enough," McCain said in October. "And I'd love to see pigs fly, but it ain't gonna happen."

The State Department has only 1,450 diplomatic security agents worldwide, with only a small portion of those in Iraq -- just 36, according to author Jeremy Scahill. Shortly after the Nisour Square shootings, Ryan Crocker, the American ambassador to Iraq, underscored this point: "There is simply no way at all that the State Department's Bureau of Diplomatic Security could ever have enough full-time personnel to staff the security function in Iraq. There is no alternative except through contracts."

Neither of the candidates appears to have commented when the State Department renewed Blackwater’s diplomatic security contract in Iraq for another year. Nor did the campaigns weigh in on the recent controversy regarding the question of contractors' immunity from prosecution in Iraqi courts.

McCain has not directly addressed his ties to private security companies. BKSH & Associates, a lobbying firm headed until this spring by McCain adviser Charles Black, advised Blackwater during congressional hearings following the Nisour Square shooting. The campaign’s senior foreign policy adviser, former Deputy Secretary of State Richard Armitage, served as a senior adviser for Veritas Capital from 2005 to 2007. Veritas owns DynCorp International, another major security contractor in Iraq. (We found no reports of anyone in Obama's campaign connected to security contractors.)

The McCain campaign declined to comment for this article, and the Obama campaign didn’t respond to our requests for an interview.

Special Feature: Read statements the candidates have made about contractors.