Updated

As militants posted graphic photos appearing to show mass executions of captured Iraqi soldiers, the White House reportedly is holding out hope there's still time to pursue a diplomatic solution.

The New York Times reported Monday that, according to a senior administration official, the White House wants to test the possibility of Iraq agreeing to a new unity government and sees a brief window for diplomacy.

According to the official, the White House wants to see if Prime Minister Nouri al-Maliki's Shiite-led government can work with the Kurds and reach out to the Sunni minority, and assure them that the government can be an "ally."

The optimism apparently is driven in part by Iraqi troops and Shiite militias fighting back against the Sunni militant group Islamic State of Iraq and Syria.

Still, a political accord could be increasingly difficult as ISIS unleashes a new wave of violence.

Over the weekend, militants posted photos that appeared to show their gunmen massacring scores of captured Iraqi soldiers. The pictures, on a militant website, appear to show masked ISIS fighters loading the captives onto flatbed trucks before forcing them to lie face-down in a shallow ditch with their arms tied behind their backs. The final images show the bodies of the captives soaked in blood after being shot at several locations.

U.S. State Department spokeswoman Jen Psaki said Sunday that a militants' claim of killing Iraqi troops "is horrifying and a true depiction of the bloodlust that those terrorists represent." She added that an ISIS claim that 1,700 were killed could not be confirmed by the U.S.

The Associated Press contributed to this report.