It included a red-carpet arrival flanked by bagpipers with a military guard of honour and seating packed with dignitaries.