"The Islamic State of Iraq gives the government of [Prime Minister Nuri al-Maliki] 48 hours to meet its demands or it will execute the rule of God on them," it said.
The Iraqi government has not yet responded to the group's claim or to its demands.
The group also said the government should hand over to it agents from Iraq's interior ministry who are accused of involvement in the widely publicised alleged rape of a Sunni woman.
"The chances of success [in Iraq] are essentially zero because the Iraqi people have no voice"
Non Sequitur, Cadiz, Spain
Send us your views
The alleged rape of the woman known by the pseudonym of Janabi, who appeared in footage broadcast on Arab TV networks saying she had been raped by interior ministry officers, triggered a bitter row at the highest levels in Iraq
Sunni leaders largely believed her claims, but al-Maliki dismissed them, alleging the rape was invented by Sunni politicians to tarnish the police at the launch of a Baghdad security crackdown.
The photos of the 20 men posted on the internet, of various ranks, included a security unit commander, according to the picture of his ministry identification card.
The statement did not say when the men were captured.
The group, which was formed last year by al-Qaeda's wing in Iraq and several smaller Sunni armed groups, has previously claimed responsibility for mass kidnappings and a series of major attacks.