Prince Harry and his wife, Meghan, will stop using their loftiest royal titles, give up state funding and repay at least $3 million in taxpayer money used to refurbish their official residence at Windsor Castle under an agreement announced by Buckingham Palace on Saturday.

The unusual deal, negotiated by aides to Queen Elizabeth II, Prince Harry and other senior family members, is intended to end a crisis that erupted 10 days ago when the couple abruptly announced plans to step back from their royal duties and spend part of each year in North America.

However civil, the agreement codifies one of the most dramatic ruptures within the British royal family since King Edward VIII abdicated the throne in 1936 to marry an American woman, Wallis Simpson. It is a spectacle that has enthralled and divided Britain, overshadowing even the country’s impending departure from the European Union, and has provoked conversations around the world about race, privilege and tradition.

Harry and Meghan’s wish to carve out more “progressive” roles led to the loss of perks, privileges and titles.

The couple plan to spend a majority of their time outside Britain, initially in Canada but later likely in the United States as well, according to officials at the palace. They will continue to carry out limited duties on behalf of the queen and will retain another of their royal titles, the Duke and Duchess of Sussex.

Harry will also remain a prince and sixth in line of succession. But under the deal, the couple will no longer use their most exclusive titles “His Royal Highness” or “Her Royal Highness” because they will no longer be working royals.