SAN JUAN, Puerto Rico (AP) – Puerto Rico’s Senate approved a key piece of legislation Saturday aimed at resolving a partial government shutdown that has closed the U.S. territory’s schools and kept more than 100,000 public employees out of work since May 1.

The Senate unanimously authorized a $740 million loan to finance the government’s operations and payroll until the end of the fiscal year on June 30.

The bill, which still needed the signature of the governor to take effect, paved the way for a half-million students to return class Monday and for furloughed civil service workers to resume their jobs.

“My pen is ready,” Gov. Anibal Acevedo Vila said minutes before the Senate announced passage of the measure.

The measure went to the Senate after being adopted unanimously by the opposition-dominated House early Saturday, hours after Acevedo warned that the deal to end the crisis could unravel if lawmakers didn’t act this weekend.

The House and Senate also approved a fund to help pay down the island’s debt, using part of the revenue from an as-yet undetermined new sales tax that was part of the agreement between the lawmakers and Acevedo to end the shutdown.

The Senate planned to debate on Tuesday a third fiscal reform measure passed by the House intended to save some $300 million a year by eliminating and consolidating government agencies.

Supporters said that legislation would eliminate only contract employees from the public payroll, not civil servants.

But union leaders and Acevedo said the proposal, which would cut roughly 3.5 percent of the government’s budget, would cut too deep. The governor’s chief of staff, Anibal Jose Torres, estimated up to 30,000 government employees could lose their jobs under the proposed cut.

Puerto Rico’s political leaders first announced they had reached a deal late Wednesday, after a special commission called for the emergency loan, the sales tax and other measures to resolve the shutdown, which crippled government services and hurt businesses on the Caribbean island.

Hotels, shops and restaurants reported a drop in business as thousands of government workers tried to get by on unemployment benefits of up to $133 a week.

The shutdown also led New York-based Moody’s Investors Service to cut the rating of the territory’s general obligation bonds to one notch above junk status – affecting about $25 billion of government debt.

Several economists said the shutdown won’t bring any savings for the treasury since the government will have to pay overtime to police officers who worked security details during daily protests.

Officials also have said furloughed workers would be paid for workdays they missed during the shutdown.