Baghdad hit out on Tuesday at alleged Turkish provocations after Ankara said it would speak out if sectarian conflict erupted in Iraq, in a dramatic worsening of tensions between the two neighbours.

Despite improving ties and increasing trade between the pair in recent years, the rhetoric between Iraqi Prime Minister Nuri al-Maliki and his Turkish counterpart Recep Tayyip Erdogan has become heated in the past two weeks as Iraq has grappled with a political crisis that has stoked sectarian tensions.

"All Iraqis are proud of belonging to their country and no other. Erdogan has provoked all Iraqis with his comments, particularly those he believes he is defending," Maliki said in a statement released by his office on Tuesday, in a clear allusion to Iraq's Sunni Arab minority.

"Sunni and Shiite Iraqis are brothers and do not need anyone claiming to defend them against each other," he said.

The statement was a quick response to remarks made by Erdogan to Turkish lawmakers in parliament, carried on television.

"Maliki should know that: if you start a conflict in Iraq in the form of sectarian clashes, it will be impossible for us to remain silent," he said.

"Those who stand by with folded arms watching brothers massacre each other are accomplices to murder," Erdogan said.

The two countries have traded accusations in recent weeks, since Erdogan telephoned Maliki on January 10 to discuss the political crisis engulfing Iraq since US troops withdrew from the country on December 18, pitting the Shiite-led government against the main Sunni-backed bloc.

At the time, authorities charged Sunni Vice President Tareq al-Hashemi with running a death squad and Maliki, a Shiite, said his Sunni deputy Saleh al-Mutlak should be sacked after the latter said the premier was "worse than Saddam Hussein."

In response, Hashemi and Mutlak's Iraqiya party has largely boycotted the cabinet and parliament, and Hashemi is holed up in the autonomous Kurdish region, which has so far declined to hand him over.

Turkey and Iraq have respectively called in each other's ambassadors to protest what they view as the other side's unfair criticism, and a mortar round struck the outer compound wall of the Turkish embassy in Baghdad last week.

On Tuesday, Erdogan heavily criticised Maliki for his accusation that Turkey was intervening in Iraq's affairs, describing the Iraqi premier's "attitude ... as very ugly and very unfortunate."

"We expect the Iraqi government to leave aside sectarian discrimination and express a responsible attitude to prevent sectarian conflicts," Erdogan said.

At the weekend, Iraq said that Turkey, Iran and unnamed Arab countries were trying to "intervene" in Baghdad's month-long political crisis and not respecting its sovereignty.

Turkey and Iraq had seen ties improve in recent years, and Ankara has said it wants to ramp up bilateral trade to $20 billion this year, compared to $12 billion in 2011.

Sunni lawmaker Haider al-Mulla, a member of the secular Iraqiya party, said on Tuesday Maliki had been warned previously to "not engage in confessional politics as it would complicate matters ... and open the way to regional interference".

Mulla said he hoped neighbouring countries would keep an "equal distance" from Iraq's sectarian components "as it is not in the interests of Sunnis to be backed by Turkey or of Shiites to be backed by Iran".