LONDON, England (CNN) -- The commander of a British regiment has become the country's highest-ranking soldier to be killed in action since 1982's Falklands War after he was killed by a roadside bomb in Afghanistan.

Lt. Col. Rupert Thorneloe, 40, was killed along with trooper Joshua Hammond, 18, Wednesday as they were traveling along a canal in Lashkar Gah, in Afghanistan's southern Helmand Province, the British Ministry of Defense said.

Thorneloe, a commanding officer who oversaw more than 1,000 men, had left the battle group headquarters on the resupply convoy so he could visit his men, because they were conducting a major operation in hostile territory, the ministry said.

He and Hammond, a tank driver, were killed despite traveling in an armored vehicle, the ministry said.

Britain's Prince Charles knew Thorneloe and said he was "completely mortified" to learn of his death. Charles is the regimental colonel of the Welsh Guards, where Thorneloe served.

"It's a wonderful family, the regiment, so everybody knows everybody," he said. "And being involved for 34 years I start to see the sons and the grandsons of people I first met 34 years ago coming into the regiment, so you can imagine the shock and horror." Watch Prince Charles speak

Defense Secretary Bob Ainsworth called Thorneloe's death a "hard blow" to the army and the military's operations in Afghanistan.

"I knew him myself, as a man of incisive thought, enormous professionalism and the greatest decency, who could not wait to leave the high-profile post in the Ministry of Defense where he had performed so impressively in order to take command of his battalion on operations," Ainsworth said in a statement.

"He saw it as the best job he would ever do, but I know that his genuinely exceptional abilities would have ensured him a brilliant career," Ainsworth added. "He led his men with energy, care, and pride -- and he died leading his men."

Don't Miss

Thorneloe spent two years at the Ministry of Defense, during which he was the military assistant to the secretary, before he assumed command of the 1st Battalion Welsh Guards last October, the ministry said.

He leaves behind a wife and two young daughters.

Hammond enlisted in the army when he was 16 and deployed to Afghanistan a month ago, said Lt. Col. Marcus Simson, his commanding officer. He was a week away from his 19th birthday, Simson said.

"He had a glint in his eye and a wry smile which always made one feel that you were in on the joke," said Major Charlie Burbridge, his squadron commander. "He was professional and capable and was only just getting into his stride as a soldier. Only days before his tragic death he had said how much he was enjoying the job.

"My words will do little to console his mother or fiance whom he planned to marry on his return from Afghanistan, but our prayers are for them. 'Hammy' was a Tankie, through and through; I am proud to have served alongside him and we will never forget him."