Image caption A ceremony marked the end of the naval training mission at Umm Qasr

Some eight years of a campaign that deeply divided British society are coming to an end.

At its peak Operation Telic, the UK's contribution to the US-led invasion of Iraq that began in 2003, involved some 46,000 personnel.

Now, the departure of a small Royal Navy training team on Sunday brings this operation finally to a close.

Some 179 British personnel have lost their lives in Iraq, 136 as a result of hostile action.

Many more were injured.

Opposition heightened

After the downfall of President Saddam Hussein, the UK's mission became one of securing the mainly Shia south, which threatened to erupt into factional conflict.

It was a controversial mission.

Many in the UK opposed the Iraq war from the outset. Opposition was only heightened when no Iraqi weapons of mass destruction were found, the ostensible reason for going to war in the first place.

But there were other questions too. Were the UK's resources up to it? Were sufficient troops deployed and did they have the right equipment to do their job?

Many of the deficiencies of Britain's Iraq operations have been discussed at length in evidence sessions to the Chilcot Inquiry into the origins and handling of the campaign. It is yet to complete its work.

Bones of contention

Its terms of reference only go up to July 2009. But it has been unusual, to say the least, to have a mainly public investigation into a military campaign on-going, while the latter stages of the operation are still under way.

Apart from the reasons for joining the US invasion in the first place and the intelligence information that led to this decision, one of the greatest bones of contention has been equipment.

Image caption British Royal Marines conducting operations on waterways in the Basra region of southern Iraq

Lord Boyce, chief of the defence staff between 2001 and 2003, was blunt in his evidence to the inquiry about restrictions that prevented him from ordering necessary equipment in good time for the start of the operation.

He launched a strong attack on the Treasury - the UK's finance ministry - saying that it was "inherently unable to deliver money unless it was beaten over the head".

Buying equipment late in the day had also, he implied, cost lives. People just did not have sufficient familiarity with it on the front line. In short, he argued, the Treasury just did not regard the country as being on anything like a war footing.

Many of his complaints have been echoed by another former senior officer, General Sir Richard Dannatt, head of the British army from 2006 to 2009. He has argued that the mission in Iraq was fatally flawed from the outset given insufficient defence spending.

Tensions with the US

There should be no doubting the bravery of British military personnel, though, or their commitment on the ground. British troops won more than 350 awards for gallantry.

But Britain's military performance also came in for some criticism from its American allies. For example a US general, Jack Keane, told the BBC in August of 2007 that Britain had never had sufficient forces in southern Iraq to protect the population there.

There seemed to be a pervasive sense among the Americans that Britain was seeking to disengage from southern Iraq too quickly, though British spokesmen at the time insisted that the drawing back of their troops into a small number of bases was all part of a planned effort to turn over day-to-day operations to the Iraqi military.

Indeed, the Chilcot Inquiry has been told by senior British officers that by this time, British troops out on the ground were increasingly becoming part of the problem, drawing the fire of various Shia factions intent on their own turf wars.

British combat forces were finally withdrawn from Iraq in July 2009. Since then the British mission has been to train and mentor Iraqi forces. The Royal Naval team is the last element of this national training effort in Iraq.

The team has operated out of the Umm Qasr naval base where it has played a key role in re-building Iraq's small navy. Much of its effort has been directed at enabling the Iraqis to protect oil terminals and other off-shore installations.

In January 2011 a British-trained Iraqi crew, operating a US-built Swift patrol boat, conducted their first solo mission in the territorial waters around the Al Basra Oil Terminal.

Britain's own training operation is ending but there will still be a small number of British personnel involved in the Nato-led training mission elsewhere in the country and Iraqi officers will continue to come for training at British military academies.