Captions on the photos showing the soldiers after they were shot say "hundreds have been liquidated," but the total could not immediately be verified.
On Friday, U.N. human rights chief Navi Pillay warned against "murder of all kinds" and other war crimes in Iraq, saying the number killed in recent days may run into the hundreds. She said in a statement that her office had received reports that militants rounded up and killed Iraqi soldiers as well as 17 civilians in a single street in Mosul. Her office also heard of "summary executions and extrajudicial killings" after ISIL militants overran Iraqi cities and towns, she said.
The grisly images could sap the morale of Iraq's security forces, but they could also heighten sectarian tensions. Thousands of Shiites are already heeding a call from their most revered spiritual leader to take up arms against the Sunni militants who have swept across the north in the worst instability in Iraq since the U.S. withdrawal in 2011.
ISIL has vowed to take the battle to Baghdad and cities farther south housing revered Shiite shrines.
Although the government bolstered defenses around Baghdad, a series of explosions inside the capital killed at least 19 people and wounded more than 40, police and hospital officials said.
Security at the U.S. Embassy was strengthened and some staff members sent elsewhere in Iraq and to neighboring Jordan, the State Department said.
While the city of 7 million is not in any immediate danger of falling to the militants, food prices have risen twofold in some cases because of transportation disruptions on the main road heading north from the capital. The city is under a nighttime curfew that begins at 10 p.m.
In a fiery speech to volunteers south of Baghdad, Prime Minister Nouri al-Maliki vowed to regain territory captured last week by the ISIL.
"We will march and liberate every inch they defaced, from the country's northernmost point to the southernmost point," he said. The volunteers responded with Shiite chants.
On Saturday, hundreds of armed Shiite men paraded through the streets of Baghdad in response to a call by Grand Ayatollah Ali al-Sistani for Iraqis to defend their country. ISIL has vowed to attack Baghdad but its advance to the south seems to have stalled in recent days. Thousands of Shiites have also volunteered to join the fight against the ISIL, also in response to al-Sistani's call.
Armed police, including SWAT teams, were seen at checkpoints in Baghdad, searching vehicles and checking drivers' documents. Security was particularly tightened on the northern and western approaches, the likely targets of ISIL fighters on the capital.
The city looked gloomy Sunday, with thin traffic and few shoppers in commercial areas. At one popular park along the Tigris River, only a fraction of the thousands who usually head there were present in the evening. In the commercial Karada district in central Baghdad, many of the sidewalk hawkers who sell anything from shoes to toys and clothes were absent.
According to police and hospital officials, a car bomb in the city center killed 10 and wounded 21. After nightfall, another explosion hit the area, killing two and wounding five. A third went off near a falafel shop in the sprawling Sadr City district, killing three and wounding seven. And late Sunday, a fourth blast in the northern Sulaikh district killed four and wounded 12.
The officials spoke on condition of anonymity because they were not authorized to speak to the media.
Suicide and car bombings in recent months have mostly targeting Shiite neighborhoods or security forces.
U.S. State Department spokeswoman Jen Psaki said in a statement that much of the embassy staff will remain even as parts of Iraq experience instability and violence.
"Overall, a substantial majority of the U.S. Embassy presence in Iraq will remain in place and the embassy will be fully equipped to carry out its national security mission," she said.
Some staff was temporarily moved elsewhere in Iraq and to Jordan, she said.
The crisis has prompted the United States to order an aircraft carrier into the Persian Gulf. It also laid out specific ways for Iraq to show it is forging the national unity necessary to gain assistance in its fight against the ISIL and other militants.
Defense Secretary Chuck Hagel ordered the USS George H.W. Bush from the northern Arabian Sea as President Barack Obama considered possible military options. Hagel's press secretary, Rear Adm. John Kirby, said the move will give Obama additional flexibility if military action were required to protect American citizens and interests in Iraq.
Accompanying the carrier will be the guided-missile cruiser USS Philippine Sea and the guided-missile destroyer USS Truxtun. The ships, which carry Tomahawk missiles that could reach Iraq, were expected to complete their move into the Persian Gulf by the end of the day. The Bush's fighter jets also could easily reach Iraq.
In neighboring Iran, the acting commander of the Islamic Republic's army ground forces, Gen. Kiomars Heidari, said Iran has increased its defenses along its western border with Iraq, though there was no immediate threat to the frontier.
Iraqi government officials said ISIL fighters were trying to capture the city of Tal Afar in northern Iraq and raining down rockets seized last week from military arms depots. The officials said the local garrison suffered heavy casualties and the town's main hospital was unable to cope with the wounded, without providing exact numbers.
The officials spoke on condition of anonymity because they were not authorized to speak to reporters. Tal Afar is mainly inhabited by Turkmen, an ethnic minority.
Al-Moussawi, the military spokesman, confirmed fighting was raging at Tal Afar, but indicated that the militants were suffering heavy casualties. On all fronts north of Baghdad, he said, a total of 297 militants have been killed in the past 24 hours.
There was no way to independently confirm his claims.
ISIL and allied Sunni militants captured a large part of northern Iraq last week, including the second-largest city of Mosul and Saddam Hussein's hometown of Tikrit, as Iraqi troops, many of them armed and trained by the U.S., fled in disarray, surrendering vehicles, weapons and ammunition to the powerful extremist group, which also fights in Syria.
The photos of the Iraqi soldiers purported to have been killed did not provide a date or location, but al-Moussawi said the killings took place in Salahuddin province. Its capital is Tikrit.
The photo captions said their deaths were to avenge the killing of an ISIL commander, Abdul-Rahman al-Beilawy. His death was reported by both the government and ISIL shortly before the al-Qaida splinter group's lightning offensive.
"This is the fate that awaits the Shiites sent by Nouri to fight the Sunnis," one caption read, apparently referring to al-Maliki.
Most of the soldiers in the photos were in civilian clothes. Some were shown wearing military uniforms underneath, indicating they may have hastily disguised themselves as civilians to try to escape.
Some of the soldiers appeared to be pleading for their lives; others seemed terrified.
All the soldiers appeared to be in their early 20s, with some wearing European soccer jerseys. Some of the militants wore black baggy pants and shirts, many of them had sandals or flip flops.
Iraqi authorities appear to be trying to limit the dissemination of such images and other militant propaganda being shared through social media and to deny the militants their use for operational purposes.
Martin Frank, the CEO of IQ Networks, an Internet service provider in Iraq, told the AP that authorities have ordered multiple social media sites, including YouTube, Facebook and Twitter, to be blocked. On Sunday, they tightened the restrictions further by telling network operators to halt traffic for virtual private networks, which allow users to bypass Internet filters.
Internet traffic in several areas overrun by militants, including Mosul and Tikrit, was ordered to be cut off altogether, he said.
No timeframe was given for the shutdowns.
Associated Press writers Adam Schreck in Dubai, United Arab Emirates, Raphael Satter in London, Kimberly Hefling in Washington and Amir Vahdat in Tehran, Iran, contributed to this report.