Kent-based soldiers have received a timely morale boost from the Queen as they prepare for their next tour of duty.
Their Colonel-in-Chief visited the Queen's Gurkha Engineers' Maidstone base for the first time since 1987.
She swore in the unit's 5,000th recruit and commissioned three new officers.
The engineers, who have been in Afghanistan, are due to return next year, when they will be checking for bombs and other explosive devices.
During the soldiers' recent tour, they were involved mainly in building schools and roads.
But when they return next year, they will be an advanced-search unit.
During the Queen's visit to the Invicta Park Barracks she was presented with a traditional Nepalese garland from the daughter of one of the Gurkhas.
She also took the oath of allegiance from Sapper Bal Budha Magar, 19, its 5,000th recruit, who was voted the best of his intake.
The Gurkha Engineers will be training for their new job in the UK before joining the unit they will be replacing in Afghanistan later in the year.
The Queen spoke to several at the barracks, including Sapper Ashley Hall, 20, who lost both legs in a roadside bomb blast last year.
Claire Clarkson-Kearsley, whose commander husband Michael is due to be sent to Afghanistan next month, said: "She was lovely. I felt myself go red as I was talking to her."
Tilly Lambert, 20, from Ewhurst Green, near Bodiam, East Sussex, was bowled over when the Queen asked after her boyfriend, Sapper Adam Lee.
"She was wonderful. She was elegant and very gracious - the world's best grandma, in my opinion."