Britain's next prime minister, Gordon Brown, pledged on Sunday to learn lessons from the Iraq war as he took over leadership of the Labour Party from Tony Blair. The Treasury chief, who will succeed Blair as British leader on Wednesday, promised sweeping domestic reforms and a new focus on international policy, saying he recognized global extremism would not be defeated by military force alone. Future foreign policy "will reflect the truth that to isolate and defeat terrorist extremism now involves more than military force," Brown told a specially convened conference of party members in Manchester, northern England, where he made his maiden speech as leader. "It is also a struggle of ideas and ideals that in the coming years will be waged and won for hearts and minds here at home and round the world." The unpopularity of the Iraq war, and Britain's role in it, have dogged Blair through the last years of his leadership. Brown acknowledged that mistakes had been made in the handling of the war and its aftermath, and promised that lessons have been learnt for the future. Iraq had "been a divisive issue for our party and our country," Brown said, adding that he would strive to work for a Mideast peace settlement that "becomes daily more urgent." Justice Minister Harriet Harman - who has called for the government to apologize for mistakes over the Iraq war - won a vote among 3.5 million party and labor union members and was named Brown's deputy, beating a challenge from five fellow legislators. Brown, who has been waiting in the shadows to take over from Blair, received a ringing endorsement from the outgoing prime minister. Blair, smiling and measured throughout a speech to introduce Brown, said his successor and "friend of 20 years" had every quality to make him a "great prime minister." "I know from his character that he will give of his best in the service of our country, and I know from his record as chancellor that his best is as good as it gets," Blair said. The men vied to lead the party in 1994 - but Brown was persuaded to stand aside, sparking an often turbulent relationship between the duo at the pinnacle of British politics for 10 years. But Brown later praised Blair's achievements - including helping to bring peace to Northern Ireland - saying his work was historic and enduring. The 56-year-old Scot faced no challenge from fellow legislators to replace Blair, and an opinion poll for The Observer newspaper on Sunday hinted his appointment would boost the party - putting Labour ahead of the opposition Conservatives for the first time since October. Labour was placed on 39 percent, with the Conservatives on 36 percent, in the Ipsos-Mori poll of 1,970 people taken June 14-20. No margin of error was given, but in similar samples it is typically plus or minus two percent. Several hundred people gathered close to the conference venue to stage an anti-war protest and denounce Blair's record. "We are here to wave goodbye to the most dangerous and warmongering prime minister in modern British history," said Stop The War coalition chairman Andrew Murray. Britain's Sunday Times reported Brown is considering a reversal of one of his predecessor's most contentious policies - planning to restore the right of protesters to demonstrate freely outside Parliament. The move would scrap legislation passed in July 2005 that bans unauthorized protests within half a mile (800 meters) of Parliament. Brown and his new party deputy will likely face a first national election test in 2009 or 2010.