Kach had voted against the bill in committee two days earlier, but even then had reservations. He'd showed up late to the nearly 11-hour committee hearing on the bill, thinking he'd be able to duck in and out of it at will. As fate would have it, his seat was at the end of a long horseshoe, within earshot of some of the gay couples in the audience.

"I got to hear them speak and hear them talk to one another," Kach said. "And I just found it so revealing. The relationships between the same-sex couples that were up there. The love and dedication they had to one another."

But Kach was concerned when a children's book called "King & King," about a same-sex couple, was passed around as an example of how youngsters could be taught about the issue in classrooms.

"I was shocked at the grade level that it was apparently printed to appeal to," Kach said. He said he would not want his child to read such a book, but as a former math teacher, that he was comforted by the fact that Maryland parents can pull their children from sex education classes.

Kach also spoke of pressure he found distasteful from some within his party.

"I'm hearing from some Republicans that we can't let Governor O'Malley have this bill because it will be a feather in his cap," Kach said. "That is no way to govern or to legislate. We must do is what we think is right and what we think will be a greater benefit to the state of Maryland."

Costa, another Republican, also supported the bill. The Anne Arundel firefighter made his decision public Tuesday, shortly before he voted yes in committee.

"If this is a sin, let God decide, not the state," Costa, 53, said Friday. He was considered a possible yes vote last year, but did not tell colleagues what he would do.

Kach and Costa caught Annapolis off guard early in the week, but the other surprise was Alston, a Prince George's County Democrat. She walked briskly out of the State House on Friday night and declined to comment for this article.

Like Kach, she had voted against the bill in committee Tuesday night. Unlike Kach, she spoke passionately about it.

"I will vote against it on the floor," she said that night. "I made a commitment to my constituents."

But on Thursday when Democratic leaders realized they were one vote short — Del. Veronica L. Turner, a yes vote, had been rushed to the hospital on Wednesday — supporters looked to Alston, a 34-year-old lawyer.

A freshman lawmaker, she's had more trouble than any in her class. In September, she was charged by the state prosecutor's office with using campaign funds to pay for her wedding expenses, including a dress. Another round of charges came in December — using state money to pay the salary of an employee in her law practice.

During Friday's debate, House Speaker Michael E. Busch stepped from the rostrum and met with Alston as delegates spoke on the floor. Waiting for her to come out of the meeting was Del. Donald H. Dwyer Jr., an Anne Arundel County Republican who was a leading opponent of the bill. He put an arm around her shoulder and whispered in her ear.

She returned to her seat and shocked the chamber by offering a change to the bill that was considered friendly. Implementation of the law would be stayed in the case of a legal dispute over signatures calling for a referendum. Also, she added a clause that she felt strengthens protections for religious institutions.

Even as she changed her vote, she made it clear that her stance on the issue hadn't changed. "My religion still tells me that marriage is between a man and a woman," Alston said on the floor.

She wanted the issue to go to referendum. And she said she wanted the General Assembly — which has been consumed for two years by the same-sex marriage debate — to move on to other topics. "It is time for us to move beyond this issue," she said on the floor.

Olszewski, 29, a second-term Baltimore County Democrat, took a different approach. A devoted Methodist, he was worried about churches that did not want to preform same-sex marriages. Would they be protected? Would such protections stand up in court?

He says he met "scores" of times with O'Malley aides and lawyers to better understand the bill. On the floor Friday, he said the governor's measure "goes above and beyond" to protect the right of religious institutions to decide what is right for them.

Olszewski, who is seeking a doctorate in public policy at the University of Maryland, Baltimore County, said he was "dumbfounded" that gay couples could not marry but convicted rapists and murders can. And, he noted, the Scriptures do not allow those who are divorced to remarry, but society — and state law — permit it.