(CNN) -- The California Supreme Court ordered a halt Thursday to same-sex marriages in San Francisco.

The court issued an interim stay directing officials to stop allowing same sex marriages, but it stopped short of invalidating the nearly 4,000 licenses that have already been issued.

The stay will remain in effect while several cases on the issue are pending before the court.

The seven-justice court also ordered San Francisco officials to prove why they believe they "have not exceeded their authority," even though no court has determined whether existing marriage laws are unconstitutional.

Soon after the ruling was announced, Mabel Teng, San Francisco's city assessor, said the city would stop issuing same-sex marriage licenses.

The news service said those who signed their marriage licenses just before the decision described complex feelings of joy and sadness. (Full story)

"We're happy -- but we're very sorry and very upset for the people in line behind us," said Michael Duffey, an attorney who married his partner of 10 years, Larry Schodts.

The temporary stay will presumably stay in force until May or June, when oral arguments in the case will be presented.

The court ruled that the constitutionality issues may be litigated separately in another case filed in Superior Court.

More than 3,400 couples have been married since Mayor Gavin Newsom permitted gay marriages February 12.

Newsom said he welcomed the opportunity to take the city's case into court.

"I'm pleased that the process is working as well as it's working," he said. "We had hoped to get to the Supreme Court. We're now going to be making oral arguments, making our case, in front of the Supreme Court."

Protesters march past San Francisco City Hall after the state's high court called a halt Thursday to same-sex marriages.

Newsom has said he believes state constitutional provisions prohibiting discrimination trump the state law banning same-sex marriage.

The mayor's critics have charged that the constitutionality of the ban is a matter for the courts to decide -- not something for Newsom to determine unilaterally.

Newsom's actions started a nationwide spree of same-sex marriage licenses.

Marriage licenses have been granted to same-sex couples in Portland, Oregon; New Paltz, New York; Asbury Park, New Jersey; and Sandoval County, New Mexico.

There have been legal challenges to the marriages in each of the municipalities.

Earlier in the day, President Bush reaffirmed his support for an amendment to the U.S. Constitution that would effectively ban same-sex marriage.

He told a group of evangelical Christians that he "will defend the sanctity of marriage against activist courts and local officials who want to redefine marriage."

"The union of a man and woman is the most enduring human institution, honored and encouraged in cultures and by every religious faith," Bush told the National Association of Evangelicals Convention in Colorado via satellite from the White House.

"Government, by recognizing and protecting marriage, serves the interests of all. It is for that reason I support a constitutional amendment to protect marriage as the union of a man and a woman."

Bush first pledged his support after Newsom allowed the first same-sex marriages.

Gov. Arnold Schwarzenegger has said he is "very much against" same-sex marriages unless Californians vote to approve them.

Schwarzenegger ordered the state's attorney general to ask the state's Supreme Court for the ruling on whether San Francisco's actions violate state law.

Two lawsuits against the city seeking to halt the marriages and the city's suit against the state have been combined.

Massachusetts is poised to become the first state to legally sanction gay marriages after the state's Supreme Judicial Court ordered state officials to grant same-sex marriage licenses by May 17.

On Thursday, Massachusetts legislators took tentative steps in favor of a constitutional amendment that would ban gay marriage but would legalize same-sex civil unions.

The lawmakers approved three resolutions advancing the package during more than nine hours of often raucous debate. The proposed amendment still faces a number of hurdles before it could become law. (Full story)