Image copyright Reuters Image caption Argentina's Economy Minister Axel Kicillof flew to New York in July to try to make a deal with hedge funds

Argentina's plan to exit its debt default by asking investors holding defaulted bonds to swap them for new locally issued debt has been ruled "illegal" by a US court.

New York Judge Thomas Griesa said the plan was "lawless".

However, he stopped short of finding the country in contempt of court.

Argentina was trying to get around an earlier court ruling banning it from paying interest to investors who had accepted restructured bonds.

Mr Griesa ruled in July that the country must first pay the hedge funds holding out for full payment on the bonds on which it defaulted in 2001.

"I want to be very clear, this proposal is a violation of the current orders of this court... it is illegal and the court directs that it cannot be carried out," Mr Griesa said on Thursday.

The hedge funds, which bought Argentina's bonds at a big discount after its economic meltdown and previous default in 2001-02, are owed an estimated $1.3bn (£766m).

Image copyright Gettty Images Image caption Argentina President Cristina Fernandez de Kirchner says the country cannot afford to pay the hedge funds

Argentina has consistently refused to pay them, saying it cannot afford to do so, and called them "vultures" for refusing to swap their bonds for lesser valued ones.

Mr Griesa likened Argentina's stance to a man showing up to complete a house purchase with only $80,000 to buy a $100,000 property and insisting: "$80,000 is a lot of money and my family is ready to move in".

"He would be laughed out of the neighbourhood," the judge added.

On Thursday, Mr Griesa urged the two sides to try and find a compromise.

"If we can have a process leading to settlement, that is the path that should be taken," the judge said.

In July, Argentina's Economy Minister Axel Kicillof flew to New York to try to make a deal with the hedge funds.

However, the talks broke down, forcing Argentina to default on its debt - its second default in 13 years - thus exacerbating problems in its recession-hit economy.