famous central London landmark as part of celebrations to mark the 150th anniversary of the Football Association.
The Civil Service football team warms up in the grounds of Buckingham Palace as Prince William will host a reception and football match to celebrate The Fa's 150 grassroot heroes.(Reuters photo)
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.
Prince William takes part in a football training session in the garden of Buckingham Palace. (AFP photo)
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."
Prince William addresses an audience to honour The FA's 150 Grassroots Heroes. (Reuters photo)
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.
The self-proclaimed Aston Villa fan sported a pair of orange Nike football boots for the occasion, which were reportedly given to him as a gift by Manchester United and England striker Wayne Rooney.
The Civil Service team presented William with two miniature football shirts for his new son, Prince George -- one red and one white, both with 'HRH 1' on the back.
Prince William trains in the grounds of Buckingham Palace.(Reuters photo)
It was Polytechnic who prevailed in the Southern Amateur League game, however, winning 2-1.
Polytechic's manager, Geoff Brown, said the experience was "something very special".
Earlier, William had handed out medals to 150 grassroots football volunteers and praised the sport's role in British society.
"At its best, football is a powerful force for good in society. It binds people from different backgrounds, communities, faiths and abilities -- and gives them a common interest, a unifying identity," he said.
Paying tribute to the volunteers present during a pre-match reception in the palace ballroom, he added: "You change lives, you give people meaning, enjoyment, perspective, a release, an outlet; you bring people together and inject fun, laughter, passion, goals and challenges into others' lives.
A football pitch is seen in the grounds of Buckingham Palace.(Reuters photo)
"It is people like you who make our country what it is. I sincerely hope that you are immensely proud of your efforts and achievements."
Dyke said it had been a "wonderful" occasion.
"Luckily the weather's been good and it hasn't been raining so we did not rip up the lawn. The Duke was concerned that the lawn might suffer, but it's OK," he said.
"It did help having the Duke of Cambridge as your president. He said his grandmother was very happy as long as we didn't break any windows."