Barack Obama has made good on one of his election promises, announcing: "After nearly nine years, America's war in Iraq will be over." The Iraqis' assertion of their sovereignty – meaning no legal immunity for US troops – was the deal-breaker, and 39,000 US soldiers will leave Iraq by the end of the year.

Jonathan Steele wrote that the Iraq war was over and the US had learned "that putting western boots on the ground in a foreign war, particularly in a Muslim country, is madness". Yet this madness may continue in a different guise, as there is a huge gap between rhetoric and reality surrounding the US departure from Iraq. In fact, there are a number of avenues by which the US will be able to exert military influence in the country.

These can be divided into four main categories:

Embassy, consulates and private security contractors

The US embassy – the largest and most expensive in the world – is in a green zone of its own in Baghdad, supplied by armed convoys and generating its own water and electricity, and treating its own sewage. At 104 acres, the embassy is almost the same size as Vatican City. It is here that the US is transforming its military-led approach into one of muscular diplomacy.

State department figures show that some 17,000 personnel will be under the jurisdiction of the US ambassador. In addition, there are also consulates in Basra, Mosul and Kirkuk, which have been allocated more than 1,000 staff each. Crucially, all these US staff, including military and security contractors, will have diplomatic immunity. Essentially, the Obama administration is reaping the political capital of withdrawing US troops while hedging the impact of the withdrawal with an increase in private security contractors working for a diplomatic mission unlike any other on the planet.

This "surge" of contractors has even raised the possibility of controversial firm Blackwater, now known as Xe, returning to the country. The firm was responsible for the deaths of 17 Iraqis in 2007 in the infamous Nisour Square massacre, yet president and chief executive Ted Wright told the Wall Street Journal recently that he would like to do business in Iraq again.

In 2008, much was made in of the fact that as part of the Status of Forces Agreement (Sofa) between the US and Iraq, contractors would lose their immunity. However, as a congressional research report noted: "The term defined in the agreement, 'US contractors and their employees', only applies to contractors that are operating under a contract/subcontract with or for the United States forces. Therefore, US contractors operating in Iraq under contract to other US departments/agencies are not subject to the terms of the Sofa."

Congressman Jason Chaffetz questioned the replacement of military forces with contractors, asking: "Are we just playing a little bit of a shell game here?" There is some irony in the fact that a decision by the Iraqi government to deny US soldiers immunity will result in an increase in the numbers of much hated and unaccountable security contractors.

Military trainers included as part of arms deals

There are an estimated 400 arms deals between Baghdad and Washington, worth $10bn, with an additional 110 deals, worth $900m, reportedly pending. Many of these, as part of the deal, require US trainers, who would be working through the Office of Security Co-operation in the embassy. Bloomberg news reported that this "newly established office will have a core staff of 160 civilians and uniformed military alongside 750 civilian contractors overseeing Pentagon assistance programmes, including military training. They will be guarded, fed and housed by 3,500 additional contract personnel", working in 10 offices around the country .

In September, Iraq made the first payments in a £1.9bn deal to buy 18 F-16s. The agreements mean that despite the claim that Iraq took full responsibility for its airspace in October, effective aerial sovereignty will be in the hands of the Americans for years to come as they help to patrol the country's skies and control its airspace, and train its air force. A senior Iraqi politician explained to me last week: "We are absolutely incapable of defending our borders. We don't even have one fighter jet to defend our airspace."

US moving under the Nato umbrella

Nato has a training mission in Iraq that will stay through 2013. The alliance is providing expertise in logistics and policing and Iraqi lawmakers are currently discussing an extension of the Nato mission that could see US military trainers move under the jurisdiction of an agreement originally made in 2004.

Drones and targeted assassinations

With the US in de facto control of Iraq's airspace, Obama is likely to increase his reliance on drones and targeted killings as a means of attacking al-Qaida targets. As the US is still at war with al-Qaida, it can find justification in self-defence and article 51 of the UN charter.

With continued concern over a potential conflict with Iran, it is perhaps unsurprising that the US is unwilling to surrender the ability to influence events on the ground in Iraq. Hillary Clinton told reporters on Sunday: "No one, most particularly Iran, should miscalculate about our continuing commitment to and with the Iraqis going forward."

In his speech on Friday, Obama said the US sought "a normal relationship between sovereign nations, an equal partnership based on mutual interests and mutual respect". Whatever shape the relationship between the US and Iraq takes in the long term, for the short term the US is definitely remaining in the country.