Gary Lineker has won his £4.9 million ($6.04 million, 5.57 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 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.

"In this case Mr Lineker's services were provided under direct contracts with the BBC and BT Sport," said the judge, adding he could "dispose of the entire appeal" in the presenter's favour. 

The case follows similar attempts by HMRC to target other British broadcasters including popular breakfast television host Lorraine Kelly.

An HMRC spokesperson, responding to Tuesday's judgement, 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.