* Sunni education minister offers resignation in protest
* Defence ministry says troops came under fire from gunmen
* Protesters say unarmed when security forces opened fire (Changes death count after ministry estimate, adds minister's resignation, bomb attack In Baghdad)
By Suadad al-Salhy
BAGHDAD, April 23 (Reuters) - At least 23 people were killed when Iraqi security forces stormed a Sunni Muslim protest camp near Kirkuk on Tuesday, triggering a gun battle between troops and protesters and intensifying the country's sectarian tensions.
The clashes were the worst since thousands of Sunni Muslims started staging protests in December to demand an end to perceived marginalisation of their sect by Prime Minister Nuri al-Maliki's Shi'ite-led government.
Iraq's Education Minister Mohammed Tamim, a Sunni Muslim, offered his resignation on Tuesday in protest at the raid, the deputy prime minister's office said in a statement.
Iraq's defence ministry said troops opened fire after coming under attack from gunmen in the makeshift camp in a public square in Hawija, near Kirkuk, 170 km (100 miles) north of the capital Baghdad.
"When the armed forces started... to enforce the law using units of riot control forces, they were confronted with heavy fire," the defence ministry said in a statement.
The defence ministry and military sources said troops found rocket-propelled grenades, sniper rifles, AK-47 guns and other weapons at the camp.
But protest leaders said they were unarmed when security forces stormed in and started shooting early in the morning. They did not give specific figures for casualties other than to say dozens had been killed in the clashes.
"When special forces raided the square, we were not prepared and we had no weapons. They crushed some of us in their vehicles," said Ahmed Hawija, a student.
The defense ministry said 20 gunmen were killed at the camp along with three of its officers. But three military sources said twenty people at the camp and six soldiers died.
A health official said three hospitals in the Kirkuk area had received 15 dead, including one soldier, and 50 wounded including 15 members of the security forces. All those who died were killed by gunshot wounds, the source said.
Hours after the raid, Sunni tribal members attacked and briefly seized control of three checkpoints in villages around Hawija before armed forces backed by helicopter gunships took them back, military sources and tribal leaders said.
By midday local time, the situation around Hawija was calm and security forces imposed a curfew in the surrounding province of Salahuddin. After the raid, troops burned protesters' tents and cleared the square.
At least another seven people were killed when two roadside bombs exploded outside a Sunni mosque in a southern district of the Iraqi capital on Tuesday morning, police officials said.
CAUGHT UP IN CRISIS
Violence in Iraq has eased since tens of thousands died in fighting between Sunni insurgents and Shi'ite militants in 2006-2007.
But Sunni Islamist militants are still capable of major attacks. Al Qaeda's local wing has stepped up its campaign of bombings and suicide blasts since the start of the year in an attempt to provoke widespread sectarian confrontation.
Since the last U.S. troops left in December 2011, Iraq's government has also been mired in crisis over how to share power among the Shi'ite, Sunni and ethnic Kurdish parties. Maliki's critics accuse him of amassing power at their expense.
Many Iraqi Sunnis say they have been sidelined after the U.S.-led 2003 invasion that ousted Sunni strongman Saddam Hussein and allowed the country's Shi'ite majority to gain power through elections.
Sunni protests erupted in December after security forces arrested the bodyguards of the country's Sunni finance minister as part of a counter-terrorism operation, which Sunni leaders dismissed as part of a political crackdown on Maliki's foes.
Maliki tried to ease protests by offering some concessions on reforming tough anti-terrorism laws and a law targeting former members of Saddam's outlawed Baathist party - both of which Sunnis fear were used unfairly to target them. (Additional reporting by Kareem Raheem in Baghdad and Gazwan Hassan in Samarra; Writing by Patrick Markey; Editing by Andrew Heavens)