WASHINGTON (NEXSTAR) — The Senate on Thursday passed an extension of the Violence Against Women Act, ensuring funding for programs to help victims of domestic abuse through 2027.

The act was wrapped into a larger spending package.

“(It was) reauthorized after a very, very long three years,” said Sen. Joni Ernst, R-Iowa, a survivor of domestic abuse who helped get the package over the finish line. “We have a lot of wonderful advocacy groups that will be very, very excited.”

Advocates say the act was urgently needed after calls to domestic abuse hotlines skyrocketed during the pandemic. The funding will support legal advice and shelter programs for survivors and help law enforcement speed up forensic exams after an assault.

“It will help provide a lifeline to survivors of sexual and domestic violence,” Sen. Dick Durbin, D-Ill, said on the Senate floor before the vote.

He thanked the bipartisan group of senators who brokered the deal.

“For months, I’ve worked on this proposal with some amazing people,” he said.

But some say the act doesn’t do enough. Rep. Debbie Dingell, D-Mich., said it falls short of protecting women from potentially dangerous dating partners or stalkers because it does not close the so-called “boyfriend loophole.” Spouses convicted of domestic abuse cannot own a gun, but boyfriends can. Republicans, led by Ernst, fought to keep a provision that would change that out of the final bill, saying it violates the Second Amendment.

The bill now heads to President Joe Biden’s desk. He was the author of the original 1994 bill and has vowed to sign the reauthorization.