British troops will immediately end their military combat operations in Iraq, Prime Minister Gordon Brown announced Thursday.

"Today marks the closing chapter of the combat mission in Iraq," Brown said in London.

"The 20 Armoured Brigade will be lowered as British combat patrols in Basra come to an end and our armed forces prepare to draw down."

Brown praised the efforts of British forces who spent six years fighting a war that was largely unpopular at home.

"Today, Iraq is a success story," Brown said. "We owe much of that to the efforts of British troops."

The British prime minister pointed to the recent provincial elections, the improved levels of security and the overall social and economic developments that have taken place in Iraq, as proof that Britain "can be proud of our legacy that we leave there."

Iraqi Prime Minister Nouri al-Maliki said the Britain-Iraq "partnership" had been a successful effort for Iraqis.

"Now the military mission has finished, our two countries will pursue new partnerships in the areas of politics, economics, business and science," Al-Maliki said Thursday. "This will promote relationships with the countries who have stood by and backed Iraq to achieve success."

The majority of Britain's 3,700 troops will return home by the end of next month. Some 400 soldiers will remain in the country to help train Iraqi naval forces.

According to Britain's Ministry of Defence website, the troops had previously been scheduled to pull out from Iraq by the end of July.

Since arriving in Iraq six years ago, 179 British service personnel have been killed.

On Thursday, a military service in the southern city of Basra honoured those who died during the war.

In Basra, British Defence Secretary John Hutton said the sacrifices of British soldiers have "not been in vain."

"Following the peaceful elections in January, Basra has a new democratically-elected and representative Council," Hutton said. "Protected by the Iraqi Security Forces we have trained, the city finally has the chance to achieve its full potential."

In London, Brown said the soldiers' fellow Britons would not forget their actions.

"They will always be remembered for the service they have given. Our country owes them a huge debt of gratitude," he said.

Brown said a memorial commemorating his country's fallen soldiers will be located from Basra to the National Memorial Arboretum in Staffordshire, England.

The Iraqi prime minister has offered to help pick up the tab to relocate the memorial, he said.

With files from The Associated Press