President Bush celebrated the transfer of political authority in Iraq on Monday as the fulfillment of his promises to a broken country, but warned that violence and the U.S. military presence in the country are unlikely to end soon.

"After decades of brutal rule by a terror regime, the Iraqi people have their country back," Bush said at a summit of NATO leaders in Turkey, standing beside his partner in the war, British Prime Minister Tony Blair.

Bush said the transfer, moved up two days to avert what the White House feared would be spectacular attacks by insurgents on June 30, "marks a proud moral achievement for members of our coalition."

"We pledged to end a dangerous regime, to free the oppressed and to restore sovereignty," he said. "We have kept our word."

The president's aides portrayed the handoff, just more than four months before Bush is up for reelection, as a political victory for the president, saying it would suggest to voters that he has a plan for establishing a democratic, peaceful Iraq and bringing U.S. troops home.

During a morning session at the NATO meeting, Bush's national security adviser, Condoleezza Rice, received an update from the U.S. administrator of the Iraq occupation, L. Paul Bremer, then passed Bush a note. Defense Secretary Donald H. Rumsfeld, who was between them, grinned as he read the note, which officials later released. It read: "Mr. President, Iraq is sovereign. Letter was passed from Bremer at 10:26 AM Iraq time -- Condi."

Bush, using one of the thick black pens he uses to sign autographs, scrawled "Let Freedom Reign!" and sent it back to her. He checked his watch and whispered to Blair, who was sitting next to him in the front row, and the two shook hands.

Bush and Blair spoke after the NATO leaders agreed that the alliance would help the interim Iraqi government train security forces. The statement said NATO would consider "further proposals to support the nascent Iraqi security institutions."

It left unanswered questions of how many people the training would cover and whether it would take place inside or outside Iraq, reflecting continuing discord between some European governments and the war allies.

The White House said the statement demonstrated that leaders of the free world were beginning to put the bitterness of the past year's divisions over the war behind them.

But French President Jacques Chirac continued to differ with the United States, saying that any such training should not take place in Iraq because it is not "NATO's role to intervene in Iraq."

Chirac also had sharp words for Bush's call this weekend for the European Union to set a date to begin negotiations toward admitting Turkey. "If President Bush really said that the way I read it, well, not only did he go too far, but he went into a domain which is not his own," Chirac told reporters at the summit.

In other business, the NATO leaders also agreed to send more troops to Afghanistan to bolster security during elections planned for September. The force of 6,500 ground troops would increase by no more than 2,200, with 1,200 to 2,000 more troops on standby outside Afghanistan.

White House officials said Iraq's interim prime minister, Ayad Allawi, had asked for the early handoff and that Bush had been considering the idea for more than a week. Late Sunday afternoon, aides visiting Bush's hotel suite here before a black-tie dinner told him that Allawi had decided Monday should be the day.

Bush said he thought Allawi's request "was a smart thing to do" because terrorists were targeting the scheduled transfer. He also called it "a sign of confidence" by the new leaders.

"The final decision was by Prime Minister Allawi, and he thought it would strengthen his hand," Bush said. Aides said that was a reference to the ability both to crack down on terrorists and to go to power brokers in Iraqi communities to encourage them to keep peace among their people.

A senior administration official, speaking on condition of anonymity to about a hundred White House reporters, said: "We have said all along that we believe that the terrorists on the ground were going to do everything they can do, literally and figuratively, to blow up the handover of sovereignty. It's clear today that that hasn't taken place."

In a reflection of the dire conditions in Iraq as the interim government assumes power, Bush and Blair said that they would not be surprised if Allawi imposed martial law, and that they would support him if he did.

Bush asserted that Iraq's leaders "understand what we know, that the best way to defend yourself is to go on the offense and find the killers before they kill." Pointing to a picture of Abu Musab Zarqawi, a Jordanian linked to al Qaeda who has asserted responsibility for killing foreign hostages in Iraq, Bush said Allawi "may decide he's going to have to take some tough measures to deal with a brutal, coldblooded killer."

Blair agreed, saying Allawi was "faced with a group of people who will kill any number of people and who will do the most terrible acts of barbarity . . . to stop them getting a democratic and stable country."

The two leaders pledged to continue to protect Iraq's infrastructure and people. "Iraq today still has many challenges to overcome -- we recognize that," Bush said. "The United States military and our coalition partners have made a clear, specific and continuing mission in Iraq. As we train Iraqi security forces, we'll help those forces to find and destroy killers. . . .

"Iraqis' prime minister and president have told me that their goal is to eventually take full responsibility for the security of their country, and America wants Iraqi forces to take that role. Our military will stay as long as the stability of Iraq requires and only as long as their presence is needed and requested by the Iraqi government."

Blair said: "From now on, the coalition changes. We are there in support of the Iraqi government and the Iraqi people."

Bush and Blair used their 34-minute news conference to make a case for their home audiences that the invasion, which was never popular in Britain and has lost majority support in the United States, was worth the cost.

Like Bush, Blair pointed to Iraq as a potential example for the greater Middle East. "If Iraq becomes a stable and democratic country -- and I'm not underestimating for a single instant the difficulties in doing that, incidentally -- but if it does, that is a huge blow to the propaganda and to the efforts of the extremists," Blair said.

Bush was in a jovial mood, winking at a few reporters when the cameras were on Blair, but used somber tones when it was his turn to speak. An aide explained: "He knows that 10 hours after he walks off the stage, something terrible could happen in Baghdad."

At NATO summit, Defense Secretary Donald H. Rumsfeld leans between President Bush and Secretary of State Colin L. Powell with note from national security adviser Condoleezza Rice saying, "Iraq is sovereign." Bush replied: "Let Freedom Reign!"