SCOTLAND footballer James McFadden is battling to avoid bankruptcy after being taken to court by the taxman over unpaid debts.

The ex-Motherwell and Everton striker, 35, faces the threat of going bust if he fails to reach an agreement with HMRC.

He appeared at a sequestration hearing at Hamilton Sheriff Court where his lawyer revealed his legal team are trying to resolve the case.

McFadden is close to agreeing a deal with tax officials which will see him hand over 80 per cent of the money he owes but crunch talks are still ongoing.

READ MORE: Celtic star Nir Bitton slams 'idiots' who abuse him for being Israeli

Figures have not been disclosed and McFadden refused to discuss the case.

The Herald: James McFadden’s wonder strike was enough for Scotland to beat France in Paris back in 2007

Steven Chesney, who represented the footballer in court, said: “There is a very realistic chance of 80% of the money being repaid.

“I would ask for a short continuation to allow that to be done and for further discussions to take place between Mr McFadden and HMRC.”

Sheriff Alasdair MacFadyen granted the motion and McFadden is due back in court when the case calls again next month.

McFadden, of Hamilton, Lanarkshire, jetted out with the Scotland squad to Peru on Tuesday.

A string of high-profile former footballers have fallen foul of the taxman in recent years.

READ MORE: Celtic star Nir Bitton slams 'idiots' who abuse him for being Israeli

Ex-Rangers star Barry Ferguson was declared bankrupt with debts of £1.4 million after he failed to settle with HMRC.

Other football stars who have gone bust include Chris Sutton, Darren Jackson, Rab Douglas, and Billy McKinlay.

McFadden reached hero status with the Tartan Army after scoring a stunning winner against France in the Parc de Prince in 2007. He played 48 times for his country.

He started his playing career with Motherwell before Everton signed him for £1.25m in 2003.

He moved to Birmingham City for £5m in 2008 but returned to Everton in 2011.

McFadden signed for Queen of the South on a short-term contract last year but was appointed to an assistant coach position with the Scotland national team in March.

An HMRC spokesman said: “We don’t comment on individuals.”