Prince William, Duke of Cambridge, has completed a three-week attachment with the UK's Security and Intelligence Agencies, observing firsthand the country's fight against terrorism, Trend reports citing CNN.
The Duke spent time at MI6, GCHQ and the Security Service, observing intelligence and counter-terrorism operations at the three agencies.
He was keen to observe the work of the groups and "held his own" among high-skilled analysts and operators, GCHQ's head of counter-terrorism operations.
The UK's terror level threat for international terrorism has been set as "severe" or above for the last five years.
"Spending time inside our security and intelligence agencies, understanding more about the vital contribution they make to our national security, was a truly humbling experience," William said.
"These agencies are full of people from everyday backgrounds doing the most extraordinary work to keep us safe," he added. "They work in secret, often not even able to tell their family and friends about the work they do or the stresses they face.
"They are driven by an unrivaled patriotism and dedication to upholding the values of this country. We all owe them deep gratitude for the difficult and dangerous work they do."
William has trained as an officer cadet in the British Army, and spent four years as a search-and-rescue pilot in the Royal Air Force.
"His Royal Highness asked some probing questions and demonstrated a real grasp of our mission," David, the head of counter-terrorism at GCHQ said.
"This was a rare opportunity to expose, in detail, the technical ingenuity and problem solving skills needed on a daily basis to help keep the UK safe."