The gunmen, who were travelling in four vehicles, restrained federal policemen at a checkpoint in the Zayouna area of Baghdad, an interior ministry official said.
They then shot dead 12 people in multiple adjoining alcohol shops nearby, the ministry official said.
A medical official confirmed the toll.
With alcohol forbidden by Islam, Baghdad liquor stores are an attractive target for fundamentalist groups, made more so because they are often staffed by religious minorities.
Also Read
And gunmen killed anti-government protest organiser Abdulrahman al-Badri near the city of Baquba, north of Baghdad, officials said.
Protests broke out in Sunni areas of Shiite-majority Iraq more than four months ago.
Demonstrators have called for the resignation of Prime Minister Nuri al-Maliki, a Shiite, and criticised authorities for allegedly targeting their community with wrongful detentions and accusations of involvement in terrorism.
Violence in Iraq has fallen from its peak in 2006 and 2007, but attacks remain common, killing more than 200 people in each of the first four months of this year.