A law legalizing same-sex matrimony took effect in Washington state on Thursday, and officials geared up for a flood of marriage-license applications from gay and lesbian couples eager to exchange vows. Washington made history last month as one of three U.S. states where marriage rights were extended to same-sex couples by popular vote, joining Maryland and Maine in passing ballot initiatives on November 6 recognizing gay nuptials. Washington became the first of those states to put its law into effect - it became law at the stroke of midnight - and same-sex matrimony is set to go on the books in Maine on December 29 and in Maryland on January 1. Under Washington state law, all would-be brides and grooms must submit their marriage certificates at least three days in advance. So the first wave of same-sex Washington weddings - expected to number in the hundreds - is scheduled for Sunday. In Olympia, the state capital, the Thurston County Auditor's Office planned to grant marriage licenses to the 15 same-sex couples who entered a lottery to be served first at midnight. The office was to reopen in the morning to serve others.