Clashes on Tuesday in north Iraq between security forces and anti-government protesters allegedly infiltrated by militants left 27 people dead and about 70 injured, top army officers said.

The clashes are just the latest violence between security forces and demonstrators in recent months, and will likely further increase tensions between protesters and the government.

They broke out around 5:00 am (0200 GMT) when security forces entered an open area in Hawijah, west of Kirkuk, where demonstrations have been held since January, the high-ranking officers said.

One of the officers, a brigadier general from the division responsible for the area, said the operation was aimed at Sunni militants from a group known as the Naqshbandiya Army, and that security forces only opened fire after they were fired upon.

A second officer said that 34 Kalashnikov assault rifles and four PKM machineguns were recovered at the scene.

Two soldiers were killed and seven wounded in the operation, they said. The remainder were some combination of protesters and militants, according to the army officers.

The violence came just hours after United Nations envoy Martin Kobler called for restraint on both sides in Hawijah, where tensions have been ratcheting up.

"I encourage the Iraqi security forces to exercise the utmost self-restraint in maintaining law and order and the demonstrators to continue to preserve the peaceful character of the demonstrations," Kobler said in a statement.

Protesters have taken to the streets in Sunni-majority areas of Iraq for more than four months, calling for the resignation of Prime Minister Nuri al-Maliki and decrying the alleged targeting of their minority community by the Shiite-led authorities.

Tuesday was not the first time that the demonstrations have turned deadly -- security forces killed a protester in the north Iraq city of Mosul on March 8, and eight demonstrators near Fallujah, west of Baghdad, on January 25.