The recent military standoff between forces from the semi-autonomous region of Iraqi Kurdistan and the central government in Baghdad over disputed territory has further exposed the tensions between the region’s president, Massoud Barzani, and the Iraqi prime minister, Nouri al-Maliki.

There is, however, more to this dispute than meets the eye, as the two leaders vie for power – but not necessarily power over one another, rather, each in his respective domain.

A few years ago it would have been inconceivable to imagine Iraqi Kurds and Shiites facing each other on the battlefield. But a rare skirmish between an Iraqi police unit and a force of Iraqi Kurdish Peshmerga – the force belonging to Iraqi Kurdistan that protects the northern state – in mid-November prompted the two leaders to dispatch thousands of troops in what would appear to be preparations for a military showdown, amid emotionally charged rhetoric from both sides.

However even from the beginning, this looked very unlikely. And last week, the Speaker in the Iraqi Parliament, Osama al-Nujaifi, visited Barzani in Iraqi Kurdistan and then managed to bring military chiefs from both sides together at a meeting in Baghdad; this week the two sides agreed to pull their forces out of the disputed territory and to deal with other outstanding issues – such as a new Iraqi military command centre whose location has upset the Iraqi Kurdish authorities – that may well have exacerbated the situation.

Still, this latest standoff with the Kurds could well be a game-changer for al-Maliki.

Firstly, he has managed to turn Sunni Muslim politicians, like al-Nujaifi, who are normally his most bitter rivals into mediators. And it is hard to ignore a possible connection with the series of elections scheduled for Iraq in 2013, particularly when, on closer inspection, one can see the potential gains for both al-Maliki and Barzani.

Next year will see provincial elections nationwide in April, a regional parliamentary election and a separate provincial poll for the Kurdistan Region and, finally, a proposed early parliamentary election across the whole of Iraq. Clearly al-Maliki needs some breathing space to conduct the April elections without the fear of facing another no-confidence threat.

By placing his federal troops on the doorstep of the multi-ethnic Kirkuk – a disputed territory, which Iraq says belongs to them while the Iraqi Kurdish say it should be part of their region – the Iraqi Prime Minister is scoring points with Sunni Arabs based in, or near, the disputed areas. He’s championing Arab interests in the face of Kurdish ambitions to incorporate those areas into their semi-autonomous region. The disputed territory is the only zone where al-Maliki can shine if he intends to brigainng the Sunnis on board.

In electoral terms, al-Maliki really cannot afford to push the Sunni community any further away from him; he has been in conflict with several Sunni Muslim politicians lately. The trial of Iraqi Vice President Tariq al-Hashimi, for example, set many Sunni Muslims against the current government, pushing some Sunni Muslim leaders, including al-Nujaifi, to call for the establishment of a semi-autonomous Sunni Muslim region similar to that controlled by the Kurds.

At the same time, Ayed Allawi, the leader of the Sunni Muslim-dominated opposition, Iraqiya, continues to search for an opportunity to instigate a potential vote of no confidence in al-Maliki. Previous plans to do this were scrapped due to fading support for the idea.

Meanwhile in Iraqi Kurdistan, Barzani’s immediate reaction to the mobilization of Iraqi troops in the disputed areas may have appeared to be a spur-of-the-moment thing – but it is clear that his muscle-flexing has not been devoid of calculation.

For the first time in years, Iraqi Kurdistan’s ruling and opposition parties, and the region’s partisan and private media alike, felt morally obliged to unite in the face of what was increasingly perceived as a “threat” from the Iraqi army. Even the Change movement, a major opposition party usually strongly opposed to the Iraqi Kurdish regional government, lent its voice to Barzani’s cause.

Perhaps most importantly though, Barzani succeeded in bringing the Iraqi president, Jalal Talabani, back on side. For some months now, Barzani has run the risk of losing the support of Talabani, his main ally; together the two politicians have ruled Iraqi Kurdistan within the bounds of a power-sharing agreement for the past five years.

The two traditional allies, who head the two major parties in Iraqi Kurdistan, the Kurdistan Democratic Party and the Patriotic Union of Kurdistan, have recently disagreed on several key political issues, including the region’s relationship with the central government, their all-important 2007 strategic, power-sharing agreement as well as Iraqi Kurdistan’s draft constitution.

While Barzani was busy behind a pan-political effort to oust al-Maliki, that included him calling the current Prime Minister a dictator, Talabani was taking a more conciliatory tone. However al-Maliki has recently managed to upset the elder statesman, Talabani, too – mainly by failing to fulfill his “promise” to Talabani to disband a controversial military taskforce stationed in the disputed areas. Known as the Tigris Operations Command, the latter was set up on al-Maliki’s orders to take responsibility for security in the areas of Diyala, Salahaddin and Kirkuk, all of which border the Kurdistan Region and all of which contain disputed territories.

Perhaps al-Maliki’s decision to ditch Talabani was the price he felt he had to pay in order to forge ahead with another plan: to win over Sunni Muslim hearts and minds in the disputed areas by acting as their commander-in-chief, while simultaneously fending off an impending no-confidence vote.

However at the same time, it’s clear that the Prime Minister has also given Barzani a similar platform where he can act like the Iraqi Kurds’ commander in chief, and possibly, rally yet more Kurdish hardliners to his side.

As for the losers in this situation, what the two sides have also done with their politicking, in effect, is to inject more fear and more trouble into an already volatile territory – and especially the hotly contested, oil-rich city of Kirkuk. Extremist groups with terrorist intentions look for these kinds of troubled areas in which to inflame passions further; when feelings are running as high in the disputed areas as they have been recently, it invites extremist groups to reap their own dividends – and then it is only the local people who lose.

Roman Zagros is a UK-based media analyst and former BBC editor. He also edits the website: