Lawmakers agreed Saturday to pay back Afghanistan’s central bank for bailing out the country’s largest private lender last year, a move that could clear the way for a new line of credit for the country from the International Monetary Fund, according to Afghan and Western officials.

The vote in the lower house of parliament approved a supplementary budget intended to begin repayment of the $825 million that the central bank spent to prevent the collapse of Kabul Bank after revelations that Kabul Bank’s leadership had funneled hundreds of millions of dollars to its own shareholders and Afghan officials.

The agreement by parliament was the most significant remaining “prior action” that the IMF had demanded of the Afghan government before authorizing a new program for the country, according to officials familiar with the negotiations. The absence of an IMF program had blocked tens of millions of dollars in foreign development aid to Afghanistan.

“This is a huge step forward,” one Western official said of the parliament decision. “It’s a clear commitment by the government to pay for Kabul Bank.”

The scandal at Kabul Bank last year had threatened the country’s entire financial system. The bank’s executives doled out nearly $1 billion in illicit loans to bank shareholders and other prominent Afghans, including relatives of President Hamid Karzai and Vice President Mohammad Qasim Fahim. The scandal forced the Afghan government to take over the bank, split it in two and attempt to collect some of the outstanding loans.

Parliament agreed to pay up to $825 million over eight years minus however much the government is able to collect of the outstanding loans. The first payment is for $51 million, according to lawmaker Obaidullah Ramin.

After a visit by IMF officials to Kabul this month, an agreement was reached at the staff level to move forward with a new program, but the plan still needs approval from the world body’s management and board. The board is expected to consider approval in mid-November.

The other reforms for which the IMF and donor countries have pushed include legally binding and collateralized repayment plans from shareholders, as well as a declaration from the Afghan government on how it intends to proceed with criminal cases against individuals at Kabul Bank. No bank employee has been successfully prosecuted so far.

“The supplementary budget was approved, but this does not mean that the criminal case of Kabul Bank will be closed,” Ramin said.

Special correspondent Sayed Salahuddin in Kabul contributed to this report.