OLYMPIA, Wash. — Washington Gov. Chris Gregoire on Wednesday certified the state’s election results, and in doing so signed into law a measure that legalizes same-sex marriage in Washington state.

“This is a very important and historic day in the great state of Washington,” Gregoire said before signing the measure that officially certified the election results. “For many years now we’ve said one more step, one more step. And this is our last step for marriage equality in the state of Washington.”

The law takes effect Thursday, and King County, the state’s largest county and home to Seattle, and Thurston County, home to the state capital of Olympia, will open at 12:01 a.m. tonight to begin issuing marriage licenses to eager gay and lesbian couples.

Thurston County held a lottery on Monday, awarding ten couples the first in line to legally register there after midnight. In Pierce County, home of Tacoma, a majority of voters didn’t approve the marriage ballot initiative, but the recorder’s office is extending hours through the weekend anyway.

In Snohomish County, the Auditor’s Office announced it will work through the lunch hour and after 5 p.m. on Thursday, if necessary.

Because of the state’s mandatory three-day waiting period, the earliest that same-sex weddings can take place is Sunday.

Washington state is one of three states in which voters approved marriage equality measures on Nov. 6, approving the ballot measure with 54 percent of the vote; the other states were Maryland and Maine.

Maryland’s law takes effect Jan. 1, however couples can start picking up marriage licenses on Thursday, as long as the license has an effective date of Jan. 1. In Maine, the law takes effect on Dec. 29, and there is no mandatory waiting period.