In a letter to First Minister Alex Salmond, extracts of which have been seen by The Herald, Mr Woolas claims that the Home Office had “direct and reliable intelligence” that the pipe band visit was going to be used as a ruse to gain entry to Britain.

Mr Woolas also told Mr Salmond and Minister for External Affairs Mike Russell that a trade delegation was prevented from visiting because some of their bank accounts contained less than £5.

But the letter has reignited a row between the Home Office and the nationalist administration north of the border.

Around 30 members of the Patiala Pipe Band from Lahore were refused entry in August, leaving them unable to compete in the World Pipe Band Championships in Glasgow. Another 35 members of a trade delegation from Lahore, which is twinned with Glasgow, were also refused visas.

The delegation included Tariq Bajwa, the deputy mayor of Lahore, who met the Queen on previous visits to Glasgow.

Despite pleas from the Scottish Government and the Scotland Office, the UK Borders Agency refused to back down. Jim Murphy, the Scottish Secretary promised to “get to the bottom” of what may have been “a mistake”.

Both Mr Salmond and Mr Russell wrote to the Home Office requesting a meeting with the minister and claiming that the UK Borders Agency was failing to “fully reflect Scotland’s interests”.

In his response Mr Woolas claims that it is “definitely not the case that we make decisions without the full consideration of the available evidence” and that this included immigration history patterns and direct intelligence.

He wrote: “The visas were refused given their track record of leaving the UK with fewer people than they had arrived with and following receipt of direct and reliable intelligence that the pipe band visit was going to be used again to facilitate entry into the UK.

“Visas were also refused to a Pakistani trade delegation because the documents provided to support the applications were at best inadequate and at worst non-existent. In the applications where financial evidence was provided, bank accounts showed sums of money far below the minimum required, in some cases bank accounts contained less than £5.”

Last night Glasgow SNP MSP Anne McLaughlin said those involved in bringing over the Lahore delegation had assured her that all those who applied made their applications in good faith with the full intent of returning home and that their exchanges to Scotland “were spoiled by the distrust and barriers imposed by the Home Office”.

She added: “I’m also concerned that the UK Border Agency might not be taking Scotland’s cultural and economic interests into account when making these decisions.

“The Border Agency is a gatekeeper to Scotland and an overly draconian admittance policy to the UK could frighten off those groups that would like to engage in trade and cultural communication with us. In the middle of a global economic downturn this is severely damaging.

“Not only is the Home Office’s incompetence preventing legitimate trade opportunities from reaching into Glasgow, but their whole system perpetuates people’s misplaced fears about asylum seekers and immigrants.

“Many of my constituents have written to me expressing offence and frustration at the Border Agency’s roadblocks to their legitimate business and personal affairs and the shambolic Home Office.”

A spokesman  for Michael Russell, Scottish Minister for External Affairs,  said: “The Home Office has a record second to none for incompetence, as the cuffing they got from Joanna Lumley over their disgraceful treatment of the Gurkhas demonstrates.

“This letter actually confirms Home Office mistakes, as the position changed for the better in a number of cases after Scottish Government intervention.”

Mr Woolas said: “Migration policy, and the way in which it is implemented, benefits the whole of the UK and is sensitive to Scottish needs. However, it must not be seen in isolation from wider issues such as upskilling the domestic workforce and handling the economic downturn, which is why immigration is a matter reserved to the UK Government.

“We will make no apology for maintaining tough border controls created to prevent abuse of the immigration system.

“If applications do not contain the necessary evidence and we are not satisfied individuals will return at the end of their visit their visas will be refused.

“It is important that people do not make assumptions about these particular cases without having the full facts at their disposal.

“The UK Border Agency will always work with anyone who needs explanation of the immigration rules, and as part of this work our officers visit organisations and companies in Scotland to provide this assistance.”