British palace officials had to hastily remove several photographs of Prince William from the internet on Tuesday after realising that they showed Ministry of Defence (MoD) passwords in the background.

The photos, published on the website the 30-year-old prince shares with his wife Catherine, had aimed to provide a glimpse into his life as a search and rescue pilot with the Royal Air Force (RAF) — but revealed more than intended.

Day in the life ... Prince William at work at RAF Valley in Holyhead, Wales.

"Due to an administrative oversight, these photographs were not properly cleared at RAF Valley and the images showed unclassified MoD user names, passwords and computer screens on a restricted system," a ministry spokesman said.

"The passwords and user names shown have now been reset as a precaution and we are satisfied the images do not contravene security regulations.