The Senate voted to reopen federal agencies through Feb. 15, the first step toward ending the 35-day partial government shutdown, after President Donald Trump agreed to a stopgap spending bill that lacks the border wall money he demanded.

Following the Senate’s voice vote, the House also plans to take up the legislation Friday. Trump promised to sign it quickly, allowing hundreds of thousands of federal employees to return to work and get back pay dating to the start of the closure on Dec. 22.

"This never should have happened," Republican Senator Lisa Murkowski of Alaska said on the Senate floor before the vote. "We cannot mess with people’s lives this way."

About 800,000 federal employees were furloughed or working without pay, and many of them missed their second paycheck on Friday. Pressure on Trump and lawmakers to end the shutdown escalated Friday as the Federal Aviation Administration temporarily halted flights into New York’s LaGuardia Airport because of a shortage of air-traffic control staff.

Instead of providing border wall money, the agreement will provide time for a House-Senate conference committee three weeks to negotiate on a border-security plan.

Trump said at the White House Rose Garden that if he doesn’t get a "fair deal" from Congress by Feb. 15, the government will either shut down again or he will use emergency powers under the Constitution to address border security.

"I expect that both Democrats and Republicans will operate in good faith," the president said.

Senate Majority Leader Mitch McConnell, a Kentucky Republican, said he hopes Democrats will negotiate toward a full-year funding deal “that would include a significant investment in urgently needed border security measures, including physical barriers.”

“Hopefully, now the president has learned his lesson," Minority Leader Chuck Schumer, a New York Democrat, told reporters.

Earlier on the Senate floor, he said that while Democrats oppose a wall, "We agree on many things, such as the need for new technology and the need to strengthen security at our ports of entry. And that bodes well for coming to an eventual agreement.”