By James Shaw
BBC News, Baghdad
Iraqi police said the helicopter had been shot at from the ground
The attack took place in Diyala province north-east of Baghdad, the sources say.
A spokesman for the US military said there had been helicopter activity in the area but he was not able to confirm any other details.
The school is in the village of al-Nedawat close to the Iranian border.
Investigation
One police officer said the helicopter was shot at from the ground during the morning.
The school was said to have been hit when the aircraft returned fire.
The officer said police had spoken to eyewitnesses and that six children had been killed and six injured but the figures have not been independently confirmed.
A spokesman for the US forces in Iraq, Lt-Col Chris Garver, said the US tried to do everything possible to avoid civilian casualties, which was why it was taking the reports seriously and conducting an investigation.
There has been an escalation of violence in Diyala in recent weeks.
On Sunday, a convoy of US armoured vehicles was hit by a bomb which killed six soldiers and a Russian journalist who was travelling with them.
Diyala province in Iraq. At least 7 school children are dead and 3 more injured after a United States military helicopter opened fire on a school in the Diyala province of Iraq. The helicopter was supposed to be firing upon militants located near the school.

"A U.S. helicopter shelled Al-Saada primary school, killing seven students and injuring three. The Mindli hospital received seven bodies and three wounded of a primary school's students," said an unnamed hospital official in Iraq. 

According to reports by Baghdad police, militants on the ground began to fire at the helicopter. The helicopter then returned fire, hitting the school in the process.

Lt. Col. Chris Garver, a spokesman for the U.S. military in Iraq said that an investigation was going to be conducted and that the incident is being taken seriously. Garver also said that the soldiers in the helicopter attempted to do whatever they could to avoid civilian deaths.