The Senate approved a financial rescue package for Puerto Rico Wednesday, sending the measure to President Obama's desk two days before the island was to default on a $2 billion debt payment.

The bipartisan 68-30 vote for passage came hours after senators voted 68-32 to move forward on the bill. The House passed the measure earlier this month.

The White House and Republican and Democratic leaders in Congress had warned that without help from Washington, Puerto Rico would descend into economic chaos and a possible humanitarian crisis.

Puerto Rico is in a decade-long recession and has $70 billion in debt. Thousands have fled the island and moved to the U.S. mainland as businesses have closed, schools have struggled with limited electricity and hospitals have asked for cash payment in advance for some medication.

In a rare feat of election-year unity, all four Republican and Democratic leaders in Congress supported the bill, which would create a control board to oversee the U.S. territory's finances and supervise some debt restructuring.

President Obama said after the vote that he would sign the bill and commended Congress for passing it.

"This bill is not perfect, but it is a critical first step toward economic recovery and restored hope for millions of Americans who call Puerto Rico home," Obama said.

The legislation would not provide any direct financial aid to the territory, but leaders warned that a bailout could eventually become necessary if Congress doesn't take this step.

"If we don't act before the island misses a critical debt payment deadline this Friday, matters will only get worse -- for Puerto Rico and for taxpayers," warned Senate Majority Leader Mitch McConnell, R-Ky.

The control board would be similar to one that oversaw the District of Columbia in the late 1990s. Its seven members would oversee negotiations with creditors and the courts over reducing some debt. In addition to creating the board, the bill would require the territory to create a fiscal plan and fund public pensions, which the Puerto Rico government has shorted by more than $40 billion.

Gov. Alejandro Garcia Padilla said that with passage of the bill, "we are starting to take the island back from creditors and giving it to Puerto Ricans." He has warned the U.S. territory would face multiple lawsuits if the bill is not approved, especially following Friday's anticipated default on $1 billion in general obligation bonds. The legislation would temporarily block creditor lawsuits from being filed until February 2017.

The general obligation bonds are backed by the island's constitution, but Garcia has said the government has no money to honor that debt despite the implementation of new taxes and recent increases in utility rates. Garcia hasn't said if the island will default on the other $1 billion that is due.

"Puerto Rico cannot endure any more austerity," Garcia said in an editorial published Wednesday.

Treasury Secretary Jacob Lew visited Capitol Hill on Tuesday in a bid to persuade some reluctant Democrats concerned that the board would be too powerful. Democrats have also opposed a provision that would allow the island's government to lower the minimum wage for some younger workers.

Lew urged senators to vote for the bill even though it isn't perfect, saying that if the island defaults, the government may be forced to shut public transit, close a hospital or send police officers home.
Sen. Bob Menendez, D-N.J., was staunchly opposed to the bill, monopolizing the Senate floor for more than four hours Tuesday evening, arguing that the bill adopts a colonial approach.
Sen. Bernie Sanders, I-Vt., also opposed it.

"In my view we need austerity not for the people of Puerto Rico, but for the billionaire Wall Street hedge fund managers who have exacerbated the crisis on the island," Sanders said on the floor.

In the days before the vote, some bondholder groups worked to turn senators against the bill, arguing it doesn't sufficiently protect creditors and is tantamount to a bailout for the territory. Several labor unions also lobbied against the measure, arguing that a lower minimum wage could take money out of the Puerto Rican economy.

The legislation is needed because Puerto Rico cannot declare bankruptcy under federal law. Mainland municipalities and their utilities can, while municipalities and utilities in Puerto Rico cannot.

Some Republicans who opposed the bill said the bill could set a bad precedent for financially strapped states.

"They'll say, `if a territory can receive unprecedented authority from Congress, then why shouldn't a state?"' said Senate Judiciary Committee Chairman Chuck Grassley, R-Iowa.

The Associated Press contributed to this report.