The Duke of Cambridge made a private visit to MI6 – just hours before Russia launched its attack on Ukraine.

Second in line to the throne William visited the Secret Intelligence Service, which deals with foreign intelligence and protects the UK from risks abroad, in London on Wednesday morning.

The visit was not publicised beforehand, as is the case with private engagements, and only appeared afterwards in the Court Circular.

Duke of Cambridge attachment with the security services
The Duke of Cambridge during his three-week attachment to the United Kingdom’s Security and Intelligence Agencies in 2019 (Kensington Palace/PA)

In 2019, William spent three weeks working with MI5, MI6 and GCHQ to learn how the UK’s security and intelligence agencies work.

He said then: “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.

“These agencies are full of people from everyday backgrounds doing the most extraordinary work to keep us safe.”

It is not known whether the duke met the head of MI6, Richard Moore, known in Whitehall as C.

It is understood the visit had been in William’s diary for a number of weeks.