Three and a half million Americans live on an island that is in economic free-fall, and Congress still isn’t sure whether it will throw them a lifeline. A bipartisan bill to help Puerto Rico is expected to come to a vote soon in the House. It has flaws and it is facing opposition on many fronts, but at this late hour it offers the island its best chance of survival.

This is how urgent the situation is: Thousands of residents leave for the mainland every month to seek jobs and better public services, and the exodus will accelerate if nothing is done to change Puerto Rico’s trajectory.

With its economy in decline for a decade, the island has accumulated huge debts that it cannot repay. It owes $72 billion to investors and about $46 billion to government pension funds. The island started missing bond payments in January and it is expected to default on a nearly $2 billion payment due on July 1, which will surely prompt creditors to file a wave of lawsuits seeking repayment.

Two weeks ago, Republican and Democratic lawmakers in the House and the Obama administration reached a compromise on aiding Puerto Rico. The bill they have negotiated would establish a financial control board to oversee the island’s government and help restructure its debt in federal court, in a process similar to bankruptcy. The legislation would also require the government and the board to adequately finance public pension funds that are perilously close to empty. And it would temporarily stay, or pause, lawsuits by creditors against the island’s government while the board is established and begins its work.

The island desperately needs to restructure its debt, which is about 100 percent of its gross national product. Given its shrinking economy and population, Puerto Rico cannot possibly repay bondholders every dollar it owes them. The island’s government has cut spending and raised taxes, but that has only made the situation worse by depressing economic activity.

The success of the bill will depend largely on who is named to the seven-member oversight board. Under the legislation, President Obama would technically appoint all the members, but he would have to pick four people from lists provided by the Republican leaders in the House and the Senate; one pick each goes to Mr. Obama and the two Democratic leaders. If Republicans don’t expand the list beyond their usual ideologues, the board could end up turning to old policies that have proved to be unworkable. Deep spending cuts will not heal Puerto Rico. Lawmakers will have more success if they pick people who have experience solving financial crises and who understand Puerto Rico’s particular problems.

Sign Up for the Opinion Today Newsletter
Every weekday, get thought-provoking commentary from Op-Ed columnists, The Times editorial board and contributing writers from around the world.

The legislation has other problems. One provision would exempt Puerto Rico from the Department of Labor’s recent decision to make more managerial workers eligible for overtime pay. Another would allow the island’s governor to temporarily set a minimum wage for workers younger than 25 that is less than the federal wage floor of $7.25 an hour. The good news is that it is hard to imagine that a governor would take advantage of this measure since it would only encourage more young people to move to the states, where they are assured a higher wage.

Though the bill has the support of prominent Republicans and Democrats in the House, it still faces opposition. Some bondholders object, saying the bill unfairly benefits pensioners at their expense. Well, creditors should have known they risked losing some of the money they put in Puerto Rican bonds given how indebted the island was. Many public employees and retirees in Puerto Rico have few sources of income besides their modest pensions. They cannot be left unprotected.

Some labor unions and Senator Bernie Sanders are also opposing the bill because of its labor provisions and because the financial control board would be able to override many decisions made by the island’s elected lawmakers. They are right on those two points, and perhaps Democrats can improve the bill. But time is running out for Puerto Rico. It needs all the yes votes it can get.