Puerto Rico’s main bankruptcy case could end in early November under a schedule approved by the federal judge overseeing the island’s record-setting debt restructuring.

U.S. District Court Judge Laura Taylor Swain adopted the recommendations of a team of court mediators, who have been leading confidential talks aimed at cutting a deal among bondholders, the government and the federal oversight board responsible for steering Puerto Rico out of its long-running debt crisis.

The decision means that a bankruptcy exit plan that cuts pensions for government workers and pays billions of dollars to bondholders will come before Swain for final approval just as lawmakers, whose cooperation is needed to make the plan work, face voters in November.

The Financial Oversight and Management Board pushed for approval of its proposed debt-adjustment plan before the election in order to lock in any deal that may come with the current governor and legislature, the federal panel’s lead bankruptcy attorney Martin Bienenstock said in court.