Baghdad church hostage drama ends in bloodbath
He suggested six attackers had also died in the fighting, though other sources have said the overall death toll was lower.
About 100 people had been inside Our Lady of Salvation for an evening Mass.
The gunmen had reportedly demanded the release of jailed al-Qaeda militants.
A statement was posted on a militant website allegedly run by the Islamic State of Iraq, a Sunni militant umbrella group to which al-Qaeda in Iraq belongs, claiming responsibility for the attack.
The statement reportedly said Iraqi Christians would be "exterminated" if Muslim women in Egypt were not freed. It specifically mentioned two women in Egypt who radicals believe are being held against their will after converting to Islam.
'Priest immediately killed'
Residents of Baghdad's affluent Karada district, where the attack took place, first heard a loud explosion at about 1700 (1400 GMT) on Sunday, believed to have been a car bomb going off at the scene.
It was followed by gunfire as a group of armed men began by attacking the Iraq Stock Exchange building, police said, and then took over the Catholic church just across the road, clashing with guards and killing some of them.
It seems the church was the attackers' real target, says the BBC's Jim Muir in Baghdad.
One eyewitness, who was inside the church, said the gunmen "came into the prayer hall and immediately killed the priest". The witness, who declined to give his name, said worshippers were beaten and herded into an inner hall.
There was a hours-long stand-off as security forces surrounded the building with helicopters hovering overhead.
The militants made contact with the authorities by mobile phone, demanding the release of al-Qaeda prisoners and also of a number of Muslim women they insisted were being held prisoner by the Coptic Church in Egypt.
But the discussions got nowhere, our correspondent says, and the security forces stormed the church; Kazinform cites BBC.
See www.bbc.co.uk for full version