(Adds U.S. judge's prohibition of bond swap)
BUENOS AIRES, June 20 (Reuters) - President Cristina Fernandez said on Friday her government would negotiate with all of Argentina's creditors in a bid to avoid a new debt default that would further weaken the country's ailing economy.
"We want to pay 100 percent of creditors," Fernandez said in a speech that boosted hopes of a settlement to the legal battle between her government and "holdout" investors who are demanding full payment following Argentina's massive 2002 bond default.
Argentina's financial markets were closed for a holiday, but international bond spreads, which measure default risk, tightened sharply after she spoke.
The country is locked in a 12-year-old fight in U.S. courts with the creditors who refused to accept a 2005 and 2010 revamp of debt securities.
More than 90 percent of creditors accepted the restructurings, which left them with less than a third of the original value of their bonds. But the holdouts demanded full payment and won a series of U.S. court rulings that have brought Argentina to the verge of a new default.
Until this week, Fernandez had refused to even consider negotiating with the holdouts. She portrayed them as "vultures" picking over the bones of the 2002 debt crisis, which thrust millions of middle-class Argentines into poverty.
But on Friday, gone was any harsh rhetoric in Fernandez's remarks.
"Argentina is willing to have a dialogue," she said.
The U.S. Supreme Court this week declined to hear an appeal by Argentina in its battle against the holdouts. That left intact a ruling by Judge Thomas Griesa, of U.S. District Court in New York, that bars the government from paying the holders of its restructured debt unless it also pays the holdouts.
The next payment on restructured debt is due June 30. If Argentina does not make that payment on time, it would have a 30-day grace period before falling into technical default.
"I have given instructions to our economy ministry for our lawyers to ask the judge (Griesa) to generate the conditions to be able to reach an accord that is beneficial and egalitarian for 100 percent of creditors," Fernandez said.
Argentine stocks trading in the United States surged on the news, with the Bank of New York Argentine ADR index rising more than 6.6 percent.
Argentine risk spreads were more than 100 basis points tighter at 715 over safe-haven U.S. Treasuries, according to the JP Morgan Emerging Markets Bond Index Plus, which as a whole stood at 284 basis points over Treasuries.
Settling the dispute would allow Fernandez to finish her remaining year and a half in office without the financial tumult that would accompany a default. She is constitutionally barred from seeking a third term at the next election in October 2015.
Leading candidates to succeed her say they would follow more investment-friendly policies than Fernandez, who has expanded the state's role in Latin America's No. 3 economy with heavy-handed currency controls, import barriers, high soybean export taxes and unpredictable curbs on corn and wheat shipments.
The impasse in the U.S. courts has kept the South American grains exporting powerhouse from accessing the global bond market.
Foreign financing is needed to improve Argentina's farm infrastructure and stimulate its faltering economy as inflation soars and central bank reserves slump to eight-year lows of about $28.5 billion.
The government faces nearly $6 billion in debt payments and nearly $10 billion in 2015, according to the economy ministry.
Argentine this year struck a $5 billion compensation deal with Spain's Repsol over the 2012 nationalization of its Argentine energy unit, YPF, and agreed to pay $9.7 billion in overdue debt to the Paris Club of creditor nations.
Economy Minister Axel Kicillof on Tuesday floated the idea of swapping bonds governed by New York law for those under local jurisdiction as a way out of the legal bind. Griesa on Friday entered an order against the exchange.
"The proposal of the economy minister is in violation of the rulings and procedures now in place in the Southern District of New York, and the Republic of Argentina is prohibited from carrying out the proposal," the order said.
Many of the funds holding restructured bonds are prohibited by their own bylaws from owning debt under foreign jurisdictions. (Additional reporting by Jorge Otaola and Sarah Marsh in Buenos Aires, Daniel Bases in New York; Editing by Chizu Nomiyama, Kieran Murray and Leslie Adler)