WASHINGTON - President Bush called yesterday for a constitutional amendment that would ban gay marriage, pushing an explosive cultural issue to the forefront of the 2004 presidential campaign.

In a brief announcement, Bush urged Congress to pass an amendment to the Constitution "defining and protecting marriage as a union of a man and a woman as husband and wife."

The move followed actions in Massachusetts and San Francisco, where the mayor recently began issuing marriage licenses to gay and lesbian couples. Massachusetts' highest court ruled in November that same-sex couples have the same right as heterosexuals to marry and ordered the state to begin issuing marriage licenses to them in May.

"Unless action is taken, we can expect more arbitrary court decisions, more litigation, more defiance of the law by local officials, all of which adds to the uncertainty," said Bush, who alleged yesterday that San Francisco was violating state law.

To the delight of conservatives who have pressed Bush to speak out for such an amendment, the president said he had decided that action is needed because "a few judges and local authorities are presuming to change the most fundamental institution of civilization," and that such changes "could have serious consequences throughout the country."

Bush said an amendment could leave states free to allow other sorts of "legal arrangements other than marriage," such as the civil unions recognized in California and Vermont.

"The union of a man and a woman is the most enduring human institution," he said.

He declared that the bond between a husband and wife "promotes the welfare of children and the stability of society. Marriage cannot be severed from its cultural, religious and natural roots, without weakening the good influence of society."

Bush's endorsement was met with anger and outrage by many Democrats and civil liberties and gay-rights groups.

"Not since the days of Jim Crow segregation has our nation faced the prospect of discrimination written into law in such a shameful way," said David Tseng, executive director of Parents, Families and Friends of Lesbians and Gays. "Millions of Americans are disappointed that their president ... has bowed to political pressure to support the codification of hatred into our beloved Constitution."

Christopher E. Anders, legislative counsel for the American Civil Liberties Union, called the proposal "the nuclear bomb of anti-gay attacks" and said it could undermine state domestic partnership, adoption, foster care and kinship care laws.

The two leading Democratic presidential hopefuls, Sens. John Kerry of Massachusetts and John Edwards of North Carolina, oppose gay marriage but also oppose a constitutional amendment to ban it. They accused Bush of trying to divert attention from areas where he is vulnerable, such as the economy or Iraq. The White House denied the assertion.

Kerry said, "All Americans should be concerned when a president who is in political trouble tries to tamper with the Constitution of the United States at the start of his re-election campaign."

Edwards said: "We have had our Constitution for more than 200 years. We amended it to abolish slavery and ensure women could vote. We should not amend it over politics."

The prospects for passage of a constitutional amendment are far from clear, and the hurdles are steep. Two-thirds of each chamber of Congress and three-fourths of the states - 38 - would have to approve the proposal.

It is not clear whether Republicans have the support on Capitol Hill to see such a measure through, especially in an election year.

But conservatives, who are mounting one of the most serious efforts to amend the Constitution in the past quarter-century, said they were delighted to have presidential support.

"I've been urging him to do this for some time," said Paul Weyrich, head of the Free Congress Foundation. "Right now, I'd like to pay the mayor of San Francisco to keep up what he's doing. That has helped galvanize people."

In the past two weeks, since San Francisco officials started issuing marriage licenses to same-sex couples, more than 3,200 couples from around the country, and Europe, have flocked to the city to marry. A county in New Mexico has also started licensing gay marriages.

Facing declining poll numbers, the president is likely with his new stance to shore up his conservative base - for which banning gay marriage is a priority. He is banking on polls that show, in general, that Americans oppose gay marriage by up to a 2-to-1 margin.

The polls, though, show much ambivalence on the subject, with many who oppose gay marriage also opposed to a constitutional amendment.

"By and large, in most polls, majorities say, 'Leave it to the states,'" said Carroll Doherty, editor of the Pew Research Center.

In fact, Vice President Dick Cheney, whose daughter Mary is openly gay, said during the 2000 presidential campaign that the states, not the federal government, should decide whether to recognize same-sex relationships. Last month, he said he had not changed his position but would support whatever decision Bush made on the topic.

Doherty said Bush is trying to place himself in the middle - by stressing that he was forced to intervene because of activist judges and local officials and by not ruling out civil unions. But Doherty said he sees "real potential for a backlash" among moderate Republicans and independent voters who might see Bush as intolerant.

In a new poll by the University of Pennsylvania's National Annenberg Election Survey, 64 percent of the respondents said they would oppose laws allowing same-sex marriage in their states; 30 percent said they would back such laws. But when asked about a constitutional amendment to bar states from enacting same-sex marriage laws, 41 percent supported it and 48 percent opposed it.

A spokesman for the Log Cabin Republicans, a gay organization that backed Bush in 2000, said the president's move would likely cost him the group's support this time.

"If you're going to promote family values, then you have to value all families," said Mark Mead, the group's spokesman.

Though Kerry opposes gay marriage - and has said he disagrees with his state's high court decision - he was one of 14 senators who voted against the 1996 Defense of Marriage Act. That measure defined marriage as a union between a man and a woman, and it let states deny recognition of same-sex marriages sanctioned by other states. Republicans are likely to use Kerry's vote to portray him as left of the mainstream.

Bush said a constitutional amendment is needed because the Defense of Marriage Act, which passed Congress overwhelmingly and was signed by President Bill Clinton, has been eroded by courts and local officials.

The president did not endorse any particular wording yesterday. But he is said to embrace a proposal by Rep. Marilyn Musgrave, a Colorado Republican, stating that "Marriage in the United States shall consist only of the union of a man and a woman."

The gay marriage issue cuts across legal and religious, as well as social and political lines, and yesterday, Maryland's religious community reflected the nation's split. The Rev. William Kopp, pastor of Riverside Baptist Church in Baltimore, said he was relieved by the news and pleased to see Bush take a strong moral stand on the issue after weeks of hesitation.

"I'm a local pastor, and I believe homosexuality is against God's plan for his people, [but] I'm never surprised by what the world is going to do out there," said Kopp, an evangelical. "A constitutional amendment would certainly resolve many of the issues we face nationwide."

On the other side was Martha Horn, a lay preacher at St. George's Episcopal Church in Prince George's County, who said she found Bush's decision "appalling."

"To amend the Constitution - I mean, what's that going to mean for us?" said Horn, who plans to travel to Massachusetts to marry her longtime partner. "Life, liberty and the pursuit of happiness - unless you are a gay or lesbian person?"

Sun staff writer Frank Langfitt contributed to this article.