WASHINGTON – Democratic Sen. Amy Klobuchar and Senate Republicans broke a crippling impasse Tuesday on human trafficking legislation — a universally popular measure that had become bogged down with abortion language. The resulting impasse had also stalled the nomination of Attorney General nominee Loretta Lynch.

Klobuchar says she called Texas Republican Sen. John Cornyn from a cornfield in Moorhead over the recent congressional break with a proposal for compromise: Create two pools of money for human trafficking victims and subject only one of them to the anti-abortion rules that Republicans favored and Democrats did not.

Klobuchar, Cornyn and the entire Senate were at loggerheads earlier this month over that requirement that money for trafficking victims include language prohibiting government funding of abortions or other emergency contraception.

The bill is intended to harness more resources for federal and local law enforcement to better crack down on human traffickers. Klobuchar also is proposing an amendment that would ensure that those used in trafficking aren’t prosecuted but are treated as victims.

At some point in the process, Cornyn’s office tucked the anti-abortion language in Klobuchar’s original bill. Klobuchar said she did not see it until the bill came up for a vote by the full Senate. By that time she had already voted for it — with the abortion language — in committee.

Klobuchar asked that the provision be taken out. Cornyn refused. The resulting acrimony halted all business in the Senate, which then adjourned for a two-week recess, with Senate GOP leaders swearing that they would not move on the Lynch confirmation until the trafficking bill had been resolved.

With Tuesday’s breakthrough, Senate Republican leaders said they are hopeful Lynch’s confirmation vote could take place within a day or two.

“I think it’s important that we stood our ground,” Klobuchar said in an interview Tuesday. “I think the end result, the most important message of the day, is that we were able to work this compromise out that keeps the status quo and allows us to move forward with some really important bills. How can we start talking about girls in Nigeria if we can’t even fix our own problems?”

The compromise was reached after dozens of conversations over the past two weeks — many of those talks by cellphone as senators spent time at home.

The deal still allows abortion restrictions to be applied to federal money, but only on those dollars devoted to trafficking victims’ health care, a stream of cash of $5 million to $30 million a year from grants to community health centers.

Abortion restrictions in federal appropriations for health care purposes are fairly common. The federal rules grant exceptions for rape victims, and Klobuchar thinks most trafficking victims would fall into that category.

A separate pot of money would be created from restitution fees paid by those convicted of trafficking. That money would be used for victims’ nonmedical support, such as housing assistance.

Senate Minority Leader Harry Reid said on the floor Tuesday that he would like to “toss a bouquet” to Klobuchar for all her efforts. Cornyn said Wednesday that the Senate felt like a functional team again.

“We’ve been able to work across the aisle,” Cornyn said. “It’s also time to confirm the next attorney general.”

The House has already approved trafficking legislation — led in part by Rep. Erik Paulsen, R-Minn. Once the Senate acts, the legislation is expected to head to President Obama’s desk.

Klobuchar, who spent the better part of Tuesday pacing the hallways and talking to reporters, said she didn’t want to discuss the back and forth that led to the deal.

She was in the spotlight earlier this month after her office confirmed that one of her staffers knew of the abortion language, but failed to tell the senator about it. During the height of bitterness between Republicans and Democrats, Klobuchar went to the Senate floor and read several chapters aloud from a book about human trafficking.

“It was helpful that everyone got away because people were fighting, cats and dogs, and so I think it gave people some time to think about it,” she said. “Literally, when I got away from here, I thought, wait a minute, why can’t we just do it like this? … Maybe it’s because you’re out there in these cafes and you start thinking common sense, like how can we take care of this?”