(CNN) -- Bombs and mortars shook the major Iraqi cities of Baghdad and Mosul on Thursday, killing at least 20 people and hurting dozens of others, police said.
A pair of explosions rocked Baghdad, the capital, killing at least 18 people and injuring 50 others, police said.
In the first attack, a roadside bomb exploded at an outdoor market, killing seven people and wounding 15 others in southern Baghdad's Dora district.
The second blast took place in northern Baghdad's Saba al-Boor-area, when a suicide bomber wearing an explosive vest blew himself up in an outdoor market. Eleven people were killed and 35 others were wounded in that attack.
The motives and perpetrators weren't immediately clear, but the attacks come amid ongoing friction between Iraq's Shiite Muslim and Sunni Muslim populations.
In Mosul, about 400 kilometers (250 miles) north of Baghdad, two soldiers were killed and 13 others were wounded when mortar rounds landed on a military headquarters, police officials in Mosul said.
Separately Thursday, gunmen fatally shot the principal of the Nablis school for girls outside her home in eastern Mosul, police said.
Also, a police officer who was investigating a recent attack in Mosul was critically wounded when a roadside bomb exploded at his vehicle in the central part of the city, police said.
Iraq has seen a sharp increase in tension between its Shiite and Sunni populations since April, when security forces raided a site used by Sunni protesters to demonstrate against the Shiite-led government.
Sunnis, who represent a minority of Iraqis, have felt politically marginalized since the overthrow of Saddam Hussein in 2003. Shiites, who make up a majority of Iraqis, now dominate the government.
Shiite President Nuri al-Maliki's government fears it is being targeted by Sunni Islamists involved in fighting in neighboring Syria.
More than 800 Iraqis were killed and 2,030 wounded in violence and acts of terrorism in August, the United Nations said.
Thursday's violence comes a day after 25 people were killed in attacks across the country, Baghdad police said.