Ireland has apologised to a Nigerian student deported months before he was due to sit his final school exams, offering to fly him back to Dublin.
Kunle's fellow students joined a protest on Wednesday
Olukunle Eluhanla, 19, was wearing his school uniform when he was thrown out of Ireland on government orders.
Irish Justice Minister Michael McDowell has issued the student, known as Kunle, with a six-month visa, describing it as an "exceptional measure".
Mr Eluhanla arrived in Ireland alone in 2002, but had an asylum claim rejected.
He was flown to Lagos on 14 March on a charter flight alongside 34 other failed asylum seekers.
Under pressure from opposition politicians, church leaders and Mr Eluhanla's fellow pupils - who joined a protest in Dublin on Wednesday - Mr McDowell changed his mind, issuing the temporary visa.
"I was very, very, very surprised ... I'm just full of joy," Mr Eluhanla told Irish state broadcaster RTE.
The assistant principal of Palmerstown Community School in west Dublin spoke to his pupil on Irish radio and offered him his congratulations, joking: "I hope he has his homework done".
"This chap was devastated with the chance of not doing his (exams) ... it's fantastic," he told RTE.
Mr Eluhanla claimed asylum in Dublin after his father was killed in a shooting in Lagos.
But Mr McDowell rejected his claim, saying he still had family in Nigeria.
About 36% of asylum applications to Ireland are made by Nigerians.