Washington CNN  — 

After a long delay, the Senate Wednesday easily approved a bill to combat human trafficking.

The vote was 99-0.

Sen. Ted Cruz, R-Texas, was the only senator who did not vote.

READ: AG nominee Lynch nears vote

The bill had been hung up on a controversial abortion provision – the so-called Hyde Amendment – attached to the measure, by Republicans without the knowledge of most Democrats. The amendment is a common provision attached to most government funds for health programs that bars such funds from being used to pay for abortions, but Democrats said it was an unprecedented expansion to non-taxpayer dollars.

But that issue was resolved Tuesday after weeks of negotiations. The deal is essentially a cosmetic fix that lets both parties claim a win: It allows Republicans to say they’ve won their battle against funding abortions with government money, and Democrats to say they’ve avoided expanding the Hyde Amendment.

Passage on the anti-human trafficking measure clears the way for a vote on Loretta Lynch to become the new attorney general.

That confirmation vote is expected to happen at about 2 p.m. on Thursday, per an agreement Senate Majority Leader Mitch McConnell announced after the trafficking vote.

Lynch’s nomination has taken on historic significance – and not just because she would be the first African-American woman to lead the Justice Department. No other nominee for attorney general has had to wait this long for Senate confirmation – 166 days – since Ronald Reagan was in the White House.

Lynch supporters had accused Republicans of delaying in part because she’s an African-American woman, a charge they dismiss.

CNN’s Athena Jones, Deirdre Walsh and Alexandra Jaffe contributed to this report.