Prince Harry and his wife, Meghan Markle, will stop using their royal titles, relinquish state funding and repay millions of taxpayer dollars used to renovate their official residence, as part of an agreement announced by the Buckingham Palace on Saturday.

The couple caused a royal crisis when they announced earlier this month that they would be stepping back from their royal duties and spending the bulk of their time in North America.

The deal permits them to earn money in the private sector, though their work must “uphold the values of Her Majesty.”

Queen Elizabeth II ordered the royal family to come to an agreement with the couple, known officially as the Duke and Duchess of Sussex, which would allow them to spend part of the year in Canada and support themselves financially.

The Queen said in her own statement Saturday that she recognizes the difficulties the couple has “experienced as a result of intense scrutiny over the last two years,” adding that she supports their desire for a more independent life.

The palace said the couple agreed to repay some 2.4 million pounds of taxpayer money that was spent renovating Frogmore Cottage, their official residence near Windsor Castle. Frogmore Cottage will remain Harry and Meghan’s family home in the U.K., as the couple begins to split their time between the two countries.

The Queen said she is “pleased that together we have found a constructive and supportive way forward for my grandson and his family.”

“It is my whole family’s hope that today’s agreement allows them to start building a happy and peaceful new life,” the statement read.

Buckingham Palace said the new arrangement will take effect in Spring 2020. It would not comment on what security detail will be in place for the royal couple as they live abroad.