Argentina's President Mauricio Macri has won approval for a repayment deal which should put an end to the country's 15-year battle with holdout creditors.
The years-long debt crisis has restricted Argentina's access to international credit markets and made doing business in the country difficult.
Argentina defaulted on a $100bn (£71bn) loan in 2001.
The deal is with creditors in New York.
The repayment package was finally approved by the Senate after a 12-hour debate on Wednesday.
President Macri had warned lawmakers that a "no" vote would condemn Argentina to remain a "financial pariah" shunned by global credit markets. Argentina now only has until 14 April to pay the holdouts.
Argentina's neighbours are able to borrow with interest rates of about 5%. However, Argentina has been forced to pay at least double, leaving it short of much-needed financial help.
Wednesday's "yes" vote is a victory for President Macri, who struck the debt deal after his election win in November. The debt crisis was a central part of his presidential campaign.
Analysis; Daniel Gallas, South America business correspondent
Mauricio Macri did his "homework" as promised and got Congress to meet one of the conditions for Argentina to clear its name internationally and get back to issuing bond.
Now comes the expensive part: paying out its debt.
Macri has promised the country will start paying it on 14 April, despite some reports that Argentina might want to delay the beginning of payment.
The country is not issuing bonds yet, so it is in a weak financial position.
The government is in a hurry to raise $12bn, so it can stop printing money to pay off its internal debts and stop inflation from inflicting even more pain on the economy.
However, some in the country were against the repayment package and groups protested while the deal was being deliberated.
The previous government of President Cristina Fernandez de Kirchner refused to negotiate with the holdouts, whom it called "vulture funds".
Sen Anabel Fernandez, a member of a youth movement called La Campora, said: "They want to sell us a crisis so we buy an expensive debt on bad terms."
"This is taking us straight to hell," the senator said.
The so-called holdout creditors who can now be repaid are those who refused to agree to a restructuring of Argentina's debt after it defaulted on nearly $100bn (£71bn) in 2001.
At the heart the deal is a cash payment of $4.7bn, or about 75% of what Argentina owes to funds that sued the South American country in a US court over non-payment of debt.
On 16 March, Argentina's lower house of Congress approved the debt deal after 20 hours of debate.
A majority of 165 to 86 lawmakers voted in favour of repealing two bills which stood in the way of the agreement with creditors.
The following debate in the Senate, where opposition parties have a majority, started on Wednesday, and was approved 54 votes to 16.