Gary Lineker has won his £4.9 million ($6.04 million) legal battle with British tax authorities.

The former England striker turned host of the BBC's flagship Match of the Day television programme, was told he should have been classed as an employee of both the BBC and BT Sport for his presenting duties, rather than as a freelancer.

His Majesty's Revenue and Customs took Lineker to court over what it said was an unpaid bill of £4.9 million that should have been paid on income received between 2013 and 2018.

It came as part of legislation, known as IR35, designed to clampdown on tax avoidance by so-called disguised employees, who charge for their services via limited companies.

But Lineker repeatedly insisted he had paid the correct amount of tax and tribunal judge John Brooks ruled Tuesday the law did not apply to the 62-year-old because there were direct contracts between the presenter and both the BBC and BT Sport.

Lineker tweeted later Tuesday: "Thanks for all the congratulatory messages. I am pleased that the Tribunal has endorsed my contention that I have not failed to pay any taxes or National Insurance by reason of the IR35 rules."

But an HMRC spokesperson, responding to the tribunal's verdict, said: "We do not agree with its decision that the rules cannot apply in this case and we're considering an appeal.

"It is our duty to ensure everyone pays the right tax under the law, regardless of wealth or status."

Lineker, the longest-serving presenter of Match of the Day, did not front the show for one Saturday earlier this month after being taken off air in an impartiality row.

He was criticised for comparing the launch of the UK government's new asylum policy to the rhetoric of Nazi-era Germany.

However, his removal sparked chaos across the BBC's sporting coverage as presenters, pundits and commentators showed their backing for Lineker by refusing to work.

But Lineker, the BBC's highest-paid presenter, returned to the programme the next week following a compromise agreement that included the corporation launching an independent review into its social media guidelines.