Sens. Mitch McConnell (R-Ky.) and John Cornyn (R-Tex.) attend a news conference outside the Senate chamber on April 21. Lawmakers reached a deal this week to clear a logjam over an anti-human-trafficking bill. (James Lawler Duggan/Reuters)

The Senate passed legislation on Wednesday aimed at combating sex trafficking, ending a delay that stretched more than six weeks amid partisan sparring about abortion restrictions embedded in the bill.

In the end, the practical effect of the bill approved on a 99-to-0 afternoon vote was not discernibly different than the bill that came to the Senate floor in early March.

But amendments adopted Wednesday under a bipartisan compromise allowed Democrats to claim that they had blocked a subtle expansion of long-term federal abortion restrictions, even as trafficking victims who seek help from federal programs will remain subject to a prohibition on funding for abortions except in cases of rape or incest.

The more significant consequence of the abortion impasse was to delay Senate consideration of Loretta Lynch, President Obama’s nominee for attorney general. With the anti-trafficking bill’s passage, Lynch is expected to win Senate approval Thursday afternoon.

“This has been a long, strange journey here to final passage,” said Sen. John Cornyn (R-Texas), the bill’s lead author. “But here we are.”

The bill toughens penalties for those convicted of crimes related to sex trafficking, gives federal authorities new tools to investigate suspected trafficking, and establishes a fund to aid trafficking victims.

None of those provisions were especially controversial, but a provision in the bill attaching the long-standing Hyde Amendment to the victims’ fund became a flash point when it was discovered by pro-abortion-rights Democrats after the bill landed on the Senate floor. Majority Leader Mitch McConnell (R-Ky.) tried to force Democrats to accept the language by refusing to bring Lynch’s nomination for a vote until the anti-trafficking bill moved forward.

The deadlock broke this week when the victims’ fund was restricted to non-medical purposes, and trafficking victims were instead made eligible for health care under an existing federal program already subject to abortion restrictions.

Wednesday’s vote prompted declarations of victory from both sides of the abortion debate.

Nancy Northup, president and chief executive of the Center for Reproductive Rights, lauded “the many senators who stood strong in their support of ensuring affordable access to abortion care,” while Douglas Johnson, legislative director for the National Right to Life Committee, hailed Republicans for refusing “to be bullied or stampeded, and in successfully winning extension of the Hyde Amendment policy to the new programs.”

During a vote on the Senate floor, presidential contender Sen. Rand Paul (R-Ky.) greeted Minority Leader Harry Reid (D-Nev.) with a fist bump. (C-SPAN)

Sen. Ted Cruz (R-Tex.), a presidential candidate, was not present for the final vote.

On Thursday, senators will take a morning procedural vote, then will debate Lynch’s confirmation for up to two hours, setting up a final confirmation vote in the afternoon.

Five Republicans have joined the Senate’s 44 Democrats and two independents in declaring their support for Lynch, ensuring her confirmation.

That support could grow: Three senators who have not yet indicated how they intend to vote — Kelly Ayotte (R-N.H.), Lisa Murkowski (R-Alaska) and Rob Portman (R-Ohio) — declined to discuss their intentions Wednesday.