The explosion happened in the northeastern Mafraq district at 9am (0600 GMT), they said.
"Two national guardsmen were killed," said Dr Fuad Mahmud Ibrahim.
Another two people were wounded, one of them a student, medical sources added.
They said wounded soldiers from Wednesday's blast were taken to a US base for treatment.
No other details were immediately available.
Fighters trying to overthrow Iraq's US-backed interim government are increasingly targeting checkpoints, often with bombs.
US and Iraqi officers say this shows progress in the battle against the uprising, as fighters are finding it harder to attack other targets.
Across the country
Meanwhile, the violence continued unabated across Iraq on Wednesday.
Pentagon: 1521 US soldiers have
died in Iraq since March 2003
In Mosul, armed men killed a policeman near his house in the north of the city.
A number of civilians were injured in a car bombing which targeted a US military patrol in Abu Ghraib.
Baghdad International Airport was hit by a number of mortar rounds and explosions were heard in the airport's perimeter.
And in Diwaniya, an Iraqi army unit arrested a member of the Association of Muslim Scholars, Shaikh Yunis Mahdi.
US soldier killed
In related news, a 1st Corps Support Command Soldier died on Wednesday of injuries sustained from a bomb explosion, the US military said.
The explosion occurred on a road south of Baghdad.Parliament explosion
The soldier was evacuated to a combat support hospital and later died of his wounds.
Also on Wednesday, Iraq's first freely elected parliament in half a century began its opening session - after a series of explosions targeted the gathering - marking a major milestone on the road to forming a new government.
The parliament's 275 members, elected during 30 January elections, convened in an auditorium amid tight security in the heavily guarded Green Zone with US helicopters hovering overhead.
Explosions were heard outside
the National Assembly hall
Plumes of black smoke rose from a series of explosions near the building where parliament was convening.
At least three blasts, almost certainly from mortars, echoed across the city centre.
Air raid sirens could be heard after more than half a dozen blasts echoed through central Baghdad. The assembly area was not evacuated and did not appear to have been struck.