OLYMPIA, Wash (Reuters) - The Washington state Senate took up the contentious issue of gay marriage on Wednesday, nearing a late-night vote expected to approve legislation that will move the state a step closer to becoming the nation's seventh to recognize same-sex unions. Senate sponsors of the bill said last week they had secured a 25-vote minimum needed in the 49-seat chamber to send it on to the state's House of Representatives, where the measure appeared certain to win swift approval as early as next week. Both bodies are controlled by Democrats. But the political dynamic on the issue shifted after Governor Christine Gregoire, a Democrat in her final year in office, announced last month she was backing the gay marriage bill. Shortly before the Senate convened on Wednesday night, word came that supporters had wrangled a 26th Senate vote, from Democrat Brian Hatfield, who said he had remained undecided until the last minute. In an emotional statement, Hatfield expressed the personal conflict he felt as a Christian in choosing to support the bill, and said he had prayed over his decision. "Regardless of how I choose to vote on the issue of marriage equality, I will alienate myself from friends and neighbors that I have known for years," he wrote. A vote in favor of marriage equality will enrage those who see it as a stone cast against God and the beliefs that I and thousands like me have been raised with. A vote against will label me as a bigot who is against extending the basic rights that I enjoy to all residents of our state," he added. Senate Democrats and Republicans huddled separately at about 6 p.m. local time to discuss possible amendments they might offer once debate on the measure began. Floor action was expected to run late, owing to the high profile and controversial nature of the issue. "My guess is at least a couple of hours, maybe more," said Democratic Senator Ed Murray, its chief sponsor. The public gallery to the Senate was packed with onlookers and media. With passage in the House already seen as virtually assured, opponents of same-sex matrimony say they will seek the measure's repeal with a referendum asking voters to reaffirm marriage as being exclusively between one man and one woman. To qualify for the November ballot, they need to collect at least 120,577 signatures of registered voters by July 6. Several prominent Washington-based companies employing tens of thousands of workers, including Microsoft, Amazon and Starbucks, have endorsed Washington's legislation. Editing by Steve Gorman, Daniel Trotta and Cynthia Johnston