The Echo has learned teachers were asked to hand over Mr Armani, despite knowing nothing about the operation in advance.

The matter was discussed by governors at a meeting on Wednesday and the school’s headmaster Rod Phillips will now meet the Border Agency to discuss how the operation was handled.

Student Mr Armani failed to secure asylum after his arrival in Cardiff six months ago from Afghanistan and is scheduled to fly home on Wednesday.

He is now appealing and representations are being made for him by Cardiff Central Liberal Democrat MP Jenny Willott, who has written to the Immigration Minister.

Ms Willott said: “I understand the UK Border Agency went to Cathays High en masse. He was basically taken out of his class and arrested and taken away which, I think personally, is disgraceful.

“I have written to the immigration minister about the way he was picked up at the school because I think it is completely unacceptable.

“Cathays High has a very large number of asylum-seeking children, particularly unaccompanied asylum-seeking pupils. There are going to be other children in the same situation as him who would be terrified, particularly if they come from countries where that happens to other people.”

Headteacher Mr Phillips said: “It is normally the case they are collected from home addresses rather than school.

“Clearly there is some emotion involved.

“It is not a comfortable situation for all parties and clearly a number of parties have been upset by this particular event, which is regrettable.”

But the Border Agency said it avoided going into schools unless “absolutely necessary”.

Jane Farleigh, UK Border Agency Regional Director for Wales, said: “Our officers never carry firearms and were simply wearing standard protective clothing. This individual was not detained in a classroom and was not taken away in a secure van.

“We are legally entitled to carry out operations involving immigration offenders on school premises but avoid doing so unless absolutely necessary. We are meeting the school and others involved in this case to discuss any concerns about how the operation was conducted.”