Just days after the official announcement that Prince Harry and Meghan Markle are engaged, USA Network confirmed that she would be leaving Suits at the end of the seventh season. And while that might have seemed like an obvious choice to make after news broke that she’d be joining the royal family, it turns out that her exit from the series was planned a year before her engagement news.

According to the BBC, Suits creator Aaron Korsh told Radio 4’s Today that he learned about the actress’ relationship with the royal when it was still just “burgeoning.” And while he obviously couldn’t 100 percent predict where the relationship would lead, he decided to give their love the benefit of the doubt.

He explained, “I sort of had a decision to make because I didn’t want to intrude and ask her, ‘Hey, what’s going on? What are you going to do?’ So… collectively, the writers, we decided to take a gamble that these two people are in love and it’s going to work out.”

With that in mind, they planned their show’s future storylines as if Markle were indeed leaving after the seventh season, with the option of changing things up if it became necessary.

“What we decided to do was, as the season progresses, say, ‘Look, I would rather have good things happen to Meghan in her life’ — which would likely mean her leaving the show,” Korsh explained. “So, let’s plan on that and it’s much easier to undo that, if it came to it, than to just plan on her staying forever and then finding out she’s going to go. And the only way to write a character out like that would be if they got hit by a bus or something.” (We’re definitely glad they didn’t end up having to go that way.)

There are no hard feelings behind the scenes, though. Korsh even tweeted well-wishes to his now-former coworker, writing, “Congratulations to Meghan Markle and Prince Harry on their engagement. Wonderful news, I wish you both a lifetime of happiness. Love, Aaron.”

Her costar Patrick Adams also posted a message to Markle, whose character, Rachel Zane, is engaged to marry his character, Mike Ross. “Playing Meghan’s television partner for the better part of a decade uniquely qualifies me to say this,” he wrote. “Your Royal Highness, you are a lucky man and I know your long life together will be joyful, productive and hilarious. Meghan, so happy for you, friend. Much love.”

We can only imagine it has been difficult for Markle to leave behind the show after seven years, but we’re sure that all the love she’s getting from the cast and crew makes things a little easier — that, along with the fact that she’s set to marry her love, who also happens to be an IRL prince charming.

The next season of Suits is scheduled to return to USA Network in early 2018. Markle and Prince Harry plan to marry sometime in May.

Are you surprised that the people behind Suits planned Meghan Markle’s exit before she was even engaged to Prince Harry? Let us know @BritandCo!

(photo via Robert Ascroft/USA Network/NBCU Photo Bank via Getty Images + Ian Watson/USA Network/NBCU Photo Bank via Getty Images)