BAGHDAD, Iraq (CNN) -- Suicide attacks outside two Shiite mosques killed at least 20 people in Baghdad on Thursday as worshippers left early morning prayers marking the end of Ramadan, the Interior Ministry said.
The suicide bomb blasts also wounded 35 people, a ministry official said.
The bombs went off as worshippers left the mosques to celebrate Eid al-Fitr, which marks the end of a month of fasting.
Shiite followers of Ayatolla Ali al-Sistani began their Eid celebrations Thursday. Other Shiites and Sunni Muslims have been celebrating the holiday since Tuesday.
A suicide car bomber carried out the first attack in the Zafaraniya neighborhood in southeastern Baghdad. The attack killed eight people and wounded 10. Among the victims were four Iraqi soldiers who were part of an army patrol providing security for worshippers, the ministry said.
The U.S. military said three Iraqi soldiers and one civilian were killed in the attack.
In the second attack, in eastern Baghdad's New Baghdad district, 12 people were killed and 25 were wounded when a teenage boy detonated his explosives-laden vest at a security checkpoint outside the mosque, the ministry official said.
The U.S. military said five civilians were killed when the bomber detonated his explosives as he was being searched prior to entering Al Rashood mosque. Spokesman Lt. Col. Steve Stover credited "the heroic action" of Iraqi security forces for preventing "a much higher loss of innocent life."
"The appalling use of a teenager as the suicide bomber shows how monstrous AQI (al Qaeda in Iraq) truly is," Stover said in a written statement. "To take advantage of a youth's innocence and attack a holy structure is consummate evil."
The attacks Thursday are at least the third time Eid revelers have been targeted in Iraq this week.
On Wednesday, a car bomb went off in the parking lot of a mosque in Balad, killing four people and injuring 15. The victims were part of a large crowd that had gathered to celebrate Eid in the city located 50 miles (80 km) north of Baghdad, the U.S. Army said.
U.N. envoy Staffan de Mistura condemned the ongoing attacks across Iraq in a statement from his representative.
"Mr. de Mistura described these recent attacks as particularly abhorrent, targeting men women and children as they prepared to break their fast and celebrate Eid al-Fitr al Mubarak, or on their way for the pilgrimage," the statement said.
In other violence, an explosion struck a U.S. military convoy in western Baghdad, wounding two civilians and four U.S. personnel, according to the U.S. military and Interior Ministry officials. It is unclear what caused the blast. The military's initial report said it was a roadside bomb, but the ministry officials blamed a suicide car bomber.
A mortar round also struck the International Zone, also known as the Green Zone, an Interior Ministry official said, and a Multi-National Force-Iraq spokesman confirmed that the area received indirect fire.
There were no reports of damage.
Mortar and rocket attacks on the International Zone -- which houses several embassies and government headquarters -- have become rare in recent months, following U.S. military operations in Baghdad's Sadr City and the building of a wall in the southern part of the sprawling slum.
CNN's Jomana Karadsheh contributed to this story.