This is the heart-warming moment a primary school teacher was moved to tears when pupils broke into a flashmob dance to mark her final day after 25 years.

Margaret Gabica spent quarter of a century at St Julian's Primary School in Newport, South Wales, but she wasn't prepared for such a memorable send-off.

Her pupils spent three weeks learning their routine to The Lion King's 'He Lives in You', being careful not to let their secret out of the bag.

Touching: This is the heart-warming moment primary school teacher Margaret Gabica was moved to tears when pupils broke into a flashmob to mark her final day after 25 years

Mrs Gabica spent quarter of a century at St Julian's Primary School in Newport, South Wales, but she wasn't prepared for such a memorable send-off. Her pupils are pictured surrounding her in the playground

Mrs Gabica, 62, who announced her retirement earlier this year, was presented with a card, flowers and presents at a special assembly on Wednesday morning before she went out for the final break duty of her career.

As she stood in the middle of the playground, teachers switched on an iPod and speakers and around 350 schoolchildren, aged three to seven, broke into a spontaneous but choreographed dance.

The song was chosen because Mrs Gabica has a love of musicals and one of her favourites is The Lion King.

Staff wanted to recognise her contribution and so set about dreaming up a performance which was then taught to pupils during the two-and-a-half days in the week that Mrs Gabica was not at school.

Their touching tribute was captured on video and shows the schoolchildren surrounding their teacher as they perform the routine. An emotional Mrs Gabica later joins in before receiving a farewell hug from her pupils.

Deputy headteacher Luke Mansfield told Wales Online: 'Her face was a bit shocked that we were making her do a break duty on her last day.

Mrs Gabica, 62, was stood in the middle of the playground, when teachers switched on an iPod and speakers and around 350 schoolchildren, aged three to seven, broke into a spontaneous but choreographed dance

Enjoying the moment: The touching tribute was captured on video and shows the schoolchildren surrounding their teacher as they perform the routine. The song was chosen because Mrs Gabica has a love of musicals

Staff wanted to recognise her contribution to the school and so set about dreaming up a performance which was taught to pupils during the two-and-a-half days Mrs Gabica doesn't work

'The children were better at keeping the secret than the staff. We all had to be careful with what we said when she came in to have her lunch in the staff room.

'They were very keen and really enjoyed learning the dance.'

He added: 'It was a wonderful way to celebrate all that Mrs Gabica has done for the school. Since posting it we have had so many messages from past pupils who remember their happy times in her class.

'It’s a testament to the hard work and dedication of the staff and pupils at St Julian’s.'

Mrs Gabica, who announced her retirement earlier this year, was presented with a card, flowers and presents at a special assembly on Wednesday morning before she went out for the final break duty of her career

Heart-warming display: An emotional Mrs Gabica later joins in before receiving a farewell hug from her pupils