The vote was 66-34, just shy of the two-thirds majority required for proposed changes to the Constitution.
Advocates have been promoting the amendment for years and hoped that Republican gains in recent elections would get them the needed 67 votes. But three GOP senators broke ranks with party members and provided the votes that thwarted the measure.
"Old Glory lost today," said Senate Majority Leader Bill Frist, a Tennessee Republican and one of the amendment's prime backers. "At a time when our armed services are defending America's freedom in the war on terror, it's unfortunate that a minority of my colleagues blocked" the proposal.
Those who had fought the idea -- most prominently the American Civil Liberties Union -- expressed relief.
"The Senate came close to torching our Constitution, but luckily it came through unscathed," said Caroline Fredrickson, director of the ACLU's Washington office. "We applaud those brave senators who stood up for the First Amendment and rejected this damaging and needless amendment."
President Bush expressed regret that the amendment failed. "By showing respect for our flag, we show reverence for the ideals that guide our nation," he said. "We show appreciation for the men and women who have served in defense of those ideals."
Proponents vowed to continue their fight. Passage is "not a question of if, but when," said Marty Justis, executive director of the Citizens Flag Alliance.
The group is a coalition of 147 organizations, including the American Legion, that says it has spent about $25 million on behalf of the amendment -- a campaign spurred by a 1989 Supreme Court decision that, in effect, ruled that flag-burning is a protected form of political expression under the First Amendment. The proposed amendment -- which would be the 28th to the Constitution -- would explicitly allow Congress to write laws protecting the flag.
Yesterday's vote capped two days of impassioned debate. Opponents said the push for an amendment was driven more by politics than patriotism; proponents argued that the Supreme Court had usurped the will of the people.
Fourteen Democrats joined with 52 Republicans in voting for the amendment.
Opposing it were 30 Democrats -- including Maryland Sens. Paul S. Sarbanes and Barbara A. Mikulski -- one independent and the three Republicans -- Robert F. Bennett of Utah, Lincoln Chafee of Rhode Island and Mitch McConnell of Kentucky, the chamber's No. 2 GOP leader.
Critics argued that the amendment was a solution in search of a problem. Unlike flag-burning in the late 1960s and early 1970s -- a symbol of opposition to the Vietnam War -- even amendment supporters acknowledged that recent episodes of flag desecration have been more half-witted than high-minded, the work of hooligans and, in one case, a man intent on changing his oil.
This is the third time the amendment has stalled in the Senate since 1995. The House has passed it six times during the period, including last year by a 286-130 vote.
Once a constitutional amendment clears Congress, it is sent to the states for ratification. It is added to the Constitution if approved by the legislatures of three fourths of the 50 states.
Also yesterday, the House voted on its own flag legislation: Maryland Rep. Roscoe G. Bartlett's measure to override rules set by homeowners associations and other groups that limit displays of the American flag.
Bartlett's measure was approved on a voice vote, and the Republican said he would push for quick Senate passage in hopes of sending it to Bush before the Fourth of July.
"We had hoped it would come up in time for Flag Day, but it takes time," Bartlett said.
Bartlett first proposed the legislation in 2004, after a call from Hugh Warner, a flag dealer in Frederick, who had heard about a Florida homeowners association that imposed flag restrictions. Warner was angry that rules aimed at preserving property values would prevent a resident from flying Old Glory.
Maryland has a similar law, which was passed in 2004.
Bartlett said yesterday that he understands why condominiums and homeowners groups want rules but that he could not see how a patriotic display could possibly hurt housing values.
"This is a reasonable accord," Bartlett said. "They can't deny you the right to fly the flag."
Johanna Neuman and Faye Fiore write for the Los Angeles Times. Sun reporter Gwyneth K. Shaw contributed to this article.