A picture of the Queen's written consent, allowing Prince Harry and Meghan Markle to marry, has been released by Buckingham Palace.
The Instrument of Consent was signed by the Queen in March. The first six people in line to the throne must seek the Queen's approval to marry.
Prince Harry and Meghan Markle are due to be wed on 19 May in Windsor.
Without the Queen's consent Prince Harry would have been disqualified from the line of succession.
The Instrument of Consent says: "Now know ye that we have consented and do by these presents signify our consent to the contracting of matrimony between our most dearly beloved grandson Prince Henry Charles Albert David of Wales KCVO and Rachel Meghan Markle."
You might also like:
The Instrument of Consent began after the Royal Marriages Act of 1772.
It required descendents of George II to get the sovereign's consent before they wed, otherwise their marriages would be invalid.
The Royal Marriages Act was ordered by King George III - King George II's grandson.
The law came after King George III's younger brother, the Duke of Cumberland, secretly married Lady Anne Horton, deemed to be the highly disreputable widow of a commoner.
The law was repealed and replaced with the Succession to the Crown Act 2013. As a result a member of the Royal Family can marry a Roman Catholic (but a Roman Catholic cannot become King or Queen).
The act also removed male bias from the line of succession.
The first six people in line to the throne need to obtain the Queen's permission. With the birth of Prince Louis, the Duke and Duchess of Cambridge's third child, Prince Harry is now sixth in line to the throne.