The taxman is targeting tens of ­thousands of Scottish small businesses it says are illegally avoiding tax.

HMRC says one in every 14 small and medium-sized companies - around 7% - is deliberately fiddling its returns.

This equates to more than 23,000 firms across Scotland and more than 300,000 across the UK as a whole.

Another 15% are potentially paying too little because they do not understand the rules, HMRC warns.

The new figures suggest the scale of the problem within small and medium-sized companies is costing taxpayers tens of millions of pounds every year.

As ministers attempt to grow the sector in a bid to help boost the economy, HMRC wants all small businesses to understand their tax responsibilities.

Politicians last night called on all companies to pay their fair share of tax, no matter what their size. However, others said large companies with "clever lawyers" were being let off lightly while small businesses were being targeted.

The criticism follows controversy after it emerged earlier this year that online retail giant Amazon paid just £2.4 million in tax last year, despite sales of £4 billion.

Labour MP Gordon Banks said: "Everyone should pay their taxes, whether an individual or a company.

"As a director of a small business who built it up from scratch, I know the pressures and challenges of running a business and getting the right advice."

He said it was incumbent on HMRC "to make sure that companies can easily understand and pay the tax they are liable to pay."

The Coalition government wants to boost the number of small and medium-sized enterprises across the country, calling on every firm to take on a single extra employee in a bid to reduce unemployment.

HMRC says it is keen to help the sector to grow - and to understand its full tax liabilities. And it warns that it wants to "level the playing field" among businesses by pursuing the minority of customers who break the law.

But Colin Borland, head of external affairs at the Scottish Federation of Small Businesses (SFSB), said an "incredibly complicated" system meant many small businesses were actually overpaying tax.

He said: "There is no excuse for ­deliberately evading tax and those who are responsible should be held to account, but what these figures also highlight is that 93% of small businesses do want to pay the correct amount of tax.

"But at the moment our tax system is incredibly complicated and hard for many small businesspeople to understand.  I have been told by many people that they are erring on the side of caution and not claiming reliefs they might be entitled to.

"So what you have is a system where very rich people can use very clever lawyers to reduce their tax bill and the rest of us overpay."

SNP Treasury spokesman Stewart Hosie said: "If it is true that 15% are paying the wrong amount of tax it is of course very worrying but it begs many questions.

"Is the tax code too complicated? Is the closure of local HMRC offices where businesses could get face-to-face help now coming home to roost?

"There needs to be urgent discussion face-to-face with the tax community to find out why it is so difficult to file the correct tax return."

HMRC said it was difficult to estimate how much tax evasion by small and medium sized businesses was costing the exchequer. But it calculates the overall "tax gap" is around £32 billion.

An spokesman said: "HMRC has a responsibility to ensure everyone pays the tax they owe. HMRC received an additional £1bn as part of the spending review, to make sure all businesses and individuals play by the rules."

Earlier this year HMRC launched a crackdown on the Scottish fishing industry, focusing on tax evasion by crews, owners and fish processors. In March last year the Scottish Government estimated there were 339,110 small and medium-sized Enterprises (SMEs) in Scotland, employing more than one million people.