BAGHDAD - Britain said yesterday it would withdraw all but a handful of its 4,000 soldiers in Iraq next year, ending a mission that was unpopular at home and that failed to curb the rise of Iranian-backed Shiite militias in the south.

The decision comes as the United States weighs a drawdown in its force of nearly 150,000. President-elect Barack Obama has called for withdrawing all combat troops from Iraq by spring of 2010, shifting responsibility to the Iraqis for defending the country against Sunni and Shiite extremists.

Last month, Iraq's parliament approved a security pact calling for all U.S. troops to leave the country by the end of 2011.

The British announcement, which was expected, signals a conclusion to the role of the second-biggest troop contributor to the multinational coalition. More than 45,000 British troops took part in the March 2003 invasion that overthrew Saddam Hussein.

In London, the Defense Ministry said that all but a few hundred of the 4,000 soldiers, most of them in the heavily Shiite south, would be gone by June.

It did not say when the withdrawal would begin. But the Daily Telegraph newspaper of London said it would start in March, when a U.S. unit takes over the British headquarters at the airport in Iraq's second-largest city, Basra.

A U.S. brigade will deploy to the south to train Iraqi soldiers and secure supply lines from Kuwait, the newspaper said. The Associated Press requested comment from the U.S. command but received no reply.

The British have not confirmed whether they will send more soldiers to Afghanistan. Military commanders have warned that British troops are overstretched from commitments in Iraq and Afghanistan, where Britain has about 7,800 soldiers.

In Basra, Gov. Mohammed al-Waili expressed confidence that Iraqi forces could continue to secure the area - the heart of Iraq's vital oil industry.

"Our security forces are fully ready and prepared to fill any vacuum caused by the withdrawal of British soldiers," he told the AP. "We think that the stable security situation will continue after the departure of the British."

British Prime Minister Gordon Brown had expected to make substantial reductions this year but suspended those plans after Iraqi troops launched a major attack against Shiite militias in Basra in March, wresting control of the city from extremists.

The Iraq war has been extremely unpopular in Britain, and the effort to topple Hussein never enjoyed as much support as in the United States.

At least 177 British soldiers have died in Iraq, compared with at least 4,209 members of the U.S. military mission.

Also yesterday, Iraq's election commission said it would launch a petition drive to see whether enough support exists for a referendum to decide whether Basra province will become a self-ruled region. That would give local authorities more control of the province's vast oil wealth.