Two suicide attacks in and around the Iraqi capital on Thursday killed at least 31 people and wounded dozens, officials said.

The deadliest attack took place in a commercial area of a majority Shia neighbourhood in Baghdad. At least 19 civilians were killed and 46 wounded, police said.

Another suicide bomber rammed his explosives-laden car into an Iraqi army checkpoint north of Baghdad, killing at least 12 people, police said. Seven civilians and five troops were killed in the attack in the town of Taji, about 20 kilometres north of the capital, a police officer said. At least 32 people were wounded, he added.

Medical officials confirmed the casualty figures. All officials spoke on condition of anonymity as they were not authorized to brief the media.

In an online statement, the Islamic State in Syria and Iraq claimed responsibility for the attack in the New Baghdad neighbourhood, saying it targeted Shia militia members. It later claimed responsibility for the Taji bombing in a second online statement, saying it was targeting the Iraqi army.

The Associated Press could not verify the authenticity of the statements, but they were posted on a militant website commonly used by the extremists.

The Sunni militant group often targets Iraq's Shia majority, security forces and government officials. Baghdad has seen near-daily attacks in recent weeks.

In a statement, the UN special envoy to Iraq, Jan Kubis, described the attacks as "cowardly acts," saying they are "not only aim at inflicting a heavy toll on the civilian population, but also seek to weaken the country's unity and destroy its social fabric."

"The Daesh terrorists should not be allowed to succeed," Kubis added, using the Arabic language acronym for ISIS.

The deadly attacks in the capital and beyond are seen by Iraqi officials as an attempt by the militants to distract the security forces' attention from the front lines. The attacks came a day after Iraqi special forces pushed into the ISIS-held city of Fallujah in a large-scale military operation launched last month.

Fallujah, which is about 65 kilometres west of Baghdad, is one of the last major ISIS strongholds in western Iraq. The extremist group still controls territory in the country's north and west, as well as Mosul, Iraq's second largest city.