Prince William warned footballers to watch the Buckingham Palace windows as Queen Elizabeth II's official residence staged the first football match in its 308-year history.
A match between two of England's oldest amateur teams took place in the 39-acre gardens of the famous central London landmark as part of celebrations to mark the 150th anniversary of the Football Association.
William, president of the FA and second in line to the British throne, was on hand to oversee the event, although the Queen, his grandmother, was not present.
"This magnificent home, Buckingham Palace, is at the heart of the nation, and so there cannot be a more fitting setting to celebrate our national game, and to celebrate all of you," he told volunteers and guests including FA chairman Greg Dyke and former England striker Michael Owen.
William said he was "excited" to see "football on my grandmother's lawn," before joking: "One warning, though: if anyone breaks a window, you can answer to her."
The palace has played host to pop concerts in the past, as well as two boxing matches, but never a game of football.
Civil Service FC and Polytechnic FC, both from Chiswick in west London, faced off on a pitch specially prepared by a team led by the head groundsman from Wembley Stadium, Tony Stones.
Civil Service are the sole surviving football club from the 11 teams who founded the FA in a public house in central London in 1863 and later drafted the game's 13 original laws. Polytechnic were formed in 1875.
Prior to kick-off, William shook hands with the players and spoke to match referee Howard Webb, Britain's most high-profile referee, who previously took charge of the 2010 World Cup final.
With Owen standing nearby, the Duke of Cambridge joked: "Michael's available as a super sub."
Although William did not play in the match, which took place beneath bright autumnal sunshine, he did take part in a training session alongside members of the palace's own football squad.
It was Polytechnic who prevailed in the Southern Amateur League game, however, winning 2-1.