Call it their “John Kerry” moment.

During the debate over Title 42 and the current crisis at the border Thursday, New Hampshire Sens. Maggie Hassan and Jeanne Shaheen found a way to vote both for and against keeping the policy, all within half an hour.

Here’s how it happened.

Senate Majority Leader Chuck Schumer was in a bind Thursday morning as he tried to navigate the 4,100-page, $1.7 trillion omnibus spending bill to passage. At issue, the fate of Title 42, the public-health-based immigration restriction imposed by President Donald Trump during the COVID-19 pandemic to turn away undocumented immigrants at the border.

Soon after taking office, President Joe Biden announced plans to end Title 42.

In the months after Biden’s decision, opponents dragged him to court while more than two million illegal immigrants poured across the southern border. Add the estimated 600,000 “gotaways” and Biden has the worst border security performance in presidential history.

With Title 42 scheduled to end, administration officials fear as many as 15,000 migrants will pour over the border each day. That is nearly the population of Manchester every week. The political optics are terrible for Biden and the Democrats.

Sen. Mike Lee (R-Utah) proposed an amendment to the massive omnibus spending package that would have blocked the Biden administration from rescinding the Title 42 policy. Worse for Schumer, the parliamentarian ruled Lee’s amendment germane to the year-end spending bill, which meant it could be attached with a simple majority.

In a 50-50 Senate — with Democrats in red and purple states like Arizona, Ohio, and Montana up for re-election in 2024 — getting a unanimous vote against Title 42 was a tough call for Schumer.

Enter Sens. Kyrsten Sinema (D-Ariz.) and Jon Tester (D-Mont.), with some key help from New Hampshire.

Sinema and Tester proposed an amendment to postpone Title 42 until a “proper plan to manage the crisis at our border” is in place. They also proposed billions in new spending for more judges to get more undocumented migrants processed into the U.S. more quickly, and more taxpayer-funded facilities to shelter them while they waited. It also included money to “fill gaps in the border wall,” according to reports.

But the Sinema-Tester amendment was ruled not germane, meaning it needed 60 votes to become part of the omnibus. Which gave Democrats exactly what they wanted: A “yes” vote on Title 42 that was guaranteed to fail.

The Lee amendment tying Department of Homeland Security funding to Title 42 narrowly failed on a party-line vote, 47-50, with both Hassan and Shaheen voting “no.” If the two had voted yes, the amendment would have passed, 49-48, and been part of the omnibus sent to the House for approval.

Instead, they joined seven other senators from purple states and voted for the Sinema-Tester bill. It only got 10 votes (one from a Republican, Sen. Thom Tillis of North Carolina), but now these senators can go back home and say they ‘voted for” Title 42.

Within a 25-minute span, New Hampshire’s senators voted to both kill and keep Title 42. But given the 60-vote threshold on Sinema-Tester amendment, that vote was meaningless. The only vote they cast that mattered was when they helped kill the Lee amendment.

Lee called out the Democrats’ tactics before the votes were cast, calling it a “ruse”

“It’s designed to provide political cover to a small number of people who recognize the crisis at the border and want to appear to be doing something about it, but it doesn’t,” Lee said.

Asked about their “I voted for it before I voted against it” tactics, Hassan and Shaheen declined to comment.

Hassan sits on the Homeland Security Committee, which oversees border security. During the 2022 campaign, when it appeared midterm politics might make her election competitive, Hassan reversed years of opposition to border wall funding and announced she supported more “physical barriers.” And while she opposes any deportations for the purpose of immigration enforcement, she also claimed to embrace Title 42.

As a result, she has faced protests from progressives, including a small gathering outside her office Tuesday night.

“It is heartbreaking because those people at the border are just looking for an opportunity,” said protester Grace Kindeke from the American Friends Service Committee.