London (CNN) -- A Buckingham Palace guard has been pulled off of royal wedding duty this week because of offensive posts on his Facebook page, the British Ministry of Defence told CNN Monday.
Cameron Reilly, the guard, used an offensive term to describe Pakistanis on his Facebook page, which was taken offline on Monday. CNN saw the comment before the page was removed.
"In view of the nature of the allegation, it would not be appropriate for the individual to be on parade for The Royal Wedding," the Ministry of Defence said in a statement.
Reilly, who was pictured on his page wearing the traditional tall black bearskin hat of Buckingham Palace guards, did not immediately respond to CNN attempts to contact him via Facebook.
Prince William of Wales, the second in line to the British throne, is marrying his college girlfriend Kate Middleton at Westminster Abbey in London on Friday.
British media reported that Reilly called Middleton a "stupid stuck up cow" and used an obscenity to describe her on Facebook. The Ministry of Defence declined to confirm that.
He listed "causing trouble" and "casually breaking the law" among his interests on Facebook. He said on the page that he joined the Scots Guards in 2010, and he posted several pictures of himself in military uniform.
It's in a comment on one of those photos -- showing himself holding a rifle in each hand -- that he tells a friend he couldn't fit in any more guns because he had "2 many paki's scalps in it already."
"Paki" is considered a deeply offensive term by many people of Pakistani descent.
Prince William's own brother Prince Harry had to apologize two years ago for using the term to describe a fellow soldier in a video he made.
A spokesman for Prince Harry apologized in a statement released by St. James's Palace. The spokesman said the prince -- who is third in line to the British throne -- "understands how offensive this term can be, and is extremely sorry for any offense his words might cause."
He called another soldier "our little Paki friend, Ahmed," in the video, which was filmed in 2006 and posted in 2009 by the News of the World tabloid.
"There is no question that Prince Harry was in any way seeking to insult his friend," the St. James's Palace statement said.
CNN's David Wilkinson and Richard Allen Greene contributed to this report.