Strike one up for morals and marriage.<br />SAN FRANCISCO (Reuters) - California's Supreme Court annulled more than 4,000 gay marriages in San Francisco on Thursday, finding the city acted improperly in granting marriage licenses earlier this year in defiance of state law. <br />The mayor of the liberal city ignited a passionate nationwide debate in February by allowing 4,037 same-sex couples to wed over a four-week period before the California high court halted them as it reviewed the city's actions. <br /><br />A California law backed by a voter referendum defines marriage as a union of man and women, and polls show most Californians continue to oppose gay marriage. <br /><br />"We agree with petitioners that local officials in San Francisco exceeded their authority by taking official action in violation of applicable statutory provisions," the court wrote. <br /><br />The court ordered officials "to take all necessary remedial steps to undo the continuing effects of the officials' past unauthorized actions, including making appropriate corrections to all relevant official records and notifying all affected same-sex couples that the same-sex marriages authorized by the officials are void and of no legal effect."