The Maryland House of Delegates passed emergency legislation Thursday that would allow federal employees forced to work during a government shutdown to collect unemployment insurance from a state trust fund.

President Trump signaled Thursday that he would sign a bipartisan agreement on border security to avert another shutdown. But Maryland lawmakers say they want a contingency plan in place to assist up to 22,000 federal workers from the state who could be expected to work without pay should that agreement evaporate, or in case of a shutdown sometime in the future.

The bill, which now moves to the Senate for consideration, would use state revenue to create a loan fund to pay benefits to affected workers. The state must get a letter from the U.S. Department of Labor saying that the fund won’t jeopardize compliance with the federal unemployment program, lawmakers said.

Any federal worker who draws benefits from the fund would have to reimburse the state once the federal government reopens and workers get back pay.

“I think it’s an important tool,” said Del. Jessica M. Feldmark (D-Howard), one of the original bill sponsors. “And I hope we never have to use it.”

The Labor Department told local governments during the shutdown that began Dec. 22 that federal workers compelled to work without pay were ineligible to collect federal unemployment insurance.

Congressional leaders are trying to change that.

After the shutdown, the longest in U.S. history, the D.C. Council passed legislation allowing the city to pay unemployment benefits to essential federal workers despite federal guidance denying the city that authority.

Several states, including California, Vermont and New Mexico, told their labor agencies to extend unemployment benefits to federal employees who had to work without pay.

Del. Mary Ann Lisanti (D-Harford), who chairs the subcommittee that crafted the bill, said the federal government has indicated it has no problem with Maryland creating its own separate unemployment program.

But for the legislation to go into effect, the letter is necessary, Lisanti said.

The Federal Government Shutdown Employee Assistance Loan Fund would be created through a budget amendment to transfer money from the state’s catastrophic event account.

If the bill is approved in the Senate, it will go to Gov. Larry Hogan (R) for a signature.

Hogan sent a letter to Labor Secretary Alex Azar on Jan. 28 asking him to either provide federal reimbursement to or waive the eligibility criteria so Maryland could provide unemployment insurance to essential employees.

“He is also open to legislative solutions and will closely consider any legislation that reached his desk,” Hogan spokeswoman Amelia Chasse said.

During the 35-day shutdown, Hogan said about 150,000 federal workers live in Maryland, which also is home to more than 129,000 federal civilian jobs, excluding the U.S. Postal Service and classified agencies.

State officials estimated that about 43,000 federal workers from Maryland were affected by the shutdown. The state processed more than 4,100 unemployment claims for furloughed federal employees, with an average weekly payout of $350, according to a fiscal analysis of the proposed legislation.

State officials say they do not know how many workers in Maryland were required to show up to work without pay. Nationally, about half of the 800,000 federal employees affected by the shutdown were furloughed and the other half worked without pay, according to the Office of Personnel Management.

Officials estimate that between 20,000 and 22,000 federal workers in Maryland could be eligible to draw interest-free loans from the state’s proposed unemployment trust fund, if the legislation passes and there is another shutdown.