He was taken to hospital after reportedly being knifed in the back this morning during a class.
It happened at around 10.45am at a school in the south-east city of Murcia identified as Monteagudo School.
The unnamed stabbing victim, described locally as a 41-year-old Irish national, is understood to teach English and technology at the boys-only school.
The nationality of the boy who allegedly attacked him is not yet clear.
Local reports describing the teacher as Irish said he was knifed as he was at the chalkboard with his back to the class with a bladed weapon the teenager had previously showed to a classmate in the toilets.
One said the teacher had been stabbed three times by the pupil, thought to have enrolled at the school last year.
He was taken to Morales Messeguer University Hospital in Murcia for treatment but his injuries have not been described as serious.
An investigation led by Spain’s national police is now underway and the youngster was this afternoon with specialist officers, while youth prosecutors took a decision on his immediate future.
The force has yet to comment officially but a well-placed source said the teacher had been knifed in the ribs.
A spokesperson for the Department of Foreign Affairs said it is “aware of reports and stands ready to provide consular assistance”.
Meanwhile the school where the teacher was stabbed said it was “very sorry” about what had happened.
It also confirmed the teacher was “out of danger” in a statement and said it was confident he would make a “full recovery.”
Monteagudo School in Murcia, linked to Catholic Church organisation Opus Dei, said in its short statement released to the press: “We are very sorry about what happened.
“We work daily at the school so that our pupils develop in a climate of respect and good co-existence.”
Mabel Campuzano, regional government director of education, admitted the incident had initially sparked “chaos.”
But she also confirmed the teacher was “doing quite well” and had no serious injuries.
The school where the drama occurred describes itself as a “bilingual” school which is part of a group comprising 35 educational centres across 11 regions in Spain as well 21 kindergartens and a Madrid-based university.
The school says on its website: “At Monteagudo we consider each person is different which is why we offer a personalised education that helps each pupil develop to the maximum their capacities and aptitudes.
“The principles that impulse our educational project are personalised education, the implication of families, quality and educational innovation, bilingualism and education in values.”