It had the overwhelming support of bipartisan lawmakers, buy-in from law enforcement and hospital groups, and backing from Gov. Nathan Deal. And yet legislation to require police to find and count untested sexual assault evidence almost didn’t become law in Georgia this year.

The rape kit bill, which Deal is set to sign into law Tuesday, proves yet again that even the most seemingly innocuous proposals can stir up major controversy under the Gold Dome.

“You get personalities involved. You get personal feelings involved. You get power struggles — I’ve seen it happen over and over again,” said George Hooks, a legislative historian who spent 32 years in the state Senate. “Sometimes that gets good legislation blocked. This time it didn’t.”

The legislation was spurred in part by an Atlanta Journal-Constitution investigation last year that found more than 1,400 kits went untested at Grady Memorial Hospital — even though victims wanted them transferred to law enforcement. Police had failed to pick them up, and the hospital was keeping them on the mistaken belief that federal regulations barred their release.

Legislators from both parties soon co-sponsored House Bill 827 to require for the first time that law enforcement officials collect the rape kits within 96 hours of the tests, and it called for a new statewide report detailing the number of kits analyzed — and those still awaiting a test. The measure was named "The Pursuing Justice for Rape Victims Act."

It seemed on the fast track after it breezed through the House on a 160-0 vote in late February, but it was blocked in the state Senate by state Sen. Renee Unterman, a Buford Republican who surprised, then enraged, supporters of the bill by digging in as the pressure mounted.

Unterman, who serves as chairwoman of the Senate health committee charged with vetting the legislation, contended there was no need for a statewide measure to solve a problem arising from an Atlanta hospital, although untested rape kit evidence was found across the state. She said a federal grant was funding work to clear the backlog.

She also accused Democratic state Rep. Scott Holcomb, the main sponsor of the bill and considered a rising star in his party, of politicizing the debate. In an interview, Unterman repeatedly pointed to her record shepherding women’s rights issues through the Legislature and said she was unfairly painted as an obstacle for opposing a measure she felt wasn’t necessary.

”The Democrats used it. They exploited the issue, and they used it as a wedge issue. I think that’s pretty sad that they politicized something as volatile as rape,” said Unterman, until this year the sole Republican woman in her chamber.

“If anyone could step up to the plate and do something about it,” she said, “I’m the one who would have done it.”

Soon, the opposition became the butt of late-night talk shows. Political satirist Samantha Bee lampooned her by name on her TBS show "Full Frontal," and Unterman and her Republican allies were bombarded with emails and social media messages urging her to change her stance. It quickly raised the stakes and made the debate a national story line.

“There is no doubt about it in my opinion. The media played a very powerful role in this,” said Gwinnett Sexual Assault Center & Children’s Advocacy CEO and President Ann Burdges.

And while Bee singled out Unterman, the bill’s supporters made a conscious effort to avoid turning the debate into a battle between political parties or personalities. They stayed on message during a press conference and in other public attempts to revive the legislation by listing the problems the legislation would address.

“I think they (legislators) saw the bill for what it was: It was important legislation we needed to pass on behalf of survivors in our state,” said Jennifer Bivins, the president and CEO of the Georgia Network to End Sexual Assault. “I think they listened to us, and I applaud their efforts of not giving up and continuing to push forward through the last hours, literally.”

By the session’s dying hours, lawmakers and lobbyists were negotiating behind the scenes to try to salvage the bill. House lawmakers tacked the language onto a separate bill that was still winding its way through the Legislature, and advocates pushed Unterman to change her mind. In short, it was typical late-session legislative maneuvering.

“You have 236 voices in the legislative process who are there with their own priorities, their own agendas. That means 236 different personalities in play any time legislation comes up,” said state Sen. Charlie Bethel, a Dalton Republican who supported the legislation. “Some things go surprisingly smoothly, and others don’t.”

In the closing minutes of the legislative session, Unterman took the floor to announce a change of heart after endorsing a few additions to the bill, including one that would require victims of sexual assaults be notified of their rights as victims. Holcomb, visiting from across the hall, stood squarely in her line of vision as she spoke.

When it cleared its final hurdle in the House — after midnight on the legislative session’s final day — lawmakers from both parties broke into a rare bout of bipartisan cheer and gave Holcomb a standing ovation.

“I never thought it would be controversial. We used a very inclusive process to draft the policy, and we got it right,” said Holcomb, an Atlanta attorney. “I never understood the opposition to the bill. And I thought it would be a grave mistake to wait a year and act.”

Even now, though, Unterman said she’s unsettled by the measure because she said the “infrastructure was working” and the backlog of untested rape kits is being cleared. She, too, was candid about the price she exacted for her support — though she didn’t elaborate on any specific horse-trading.

“What’s ironic is that the Democrats used the issue as a wedge, but in the end I ended up using it as a negotiating tactic,” she said. “I got a lot of leverage. And I didn’t mind using the leverage because the system was working. If it was a do-or-die bill that was critical or sensitive, I wouldn’t have used it. But it was not. The infrastructure was working, and there’s no need for it.”