SPOILER ALERT: This story contains details about tonight’s season finale of ABC’s Grey’s Anatomy.

Grey’s Anatomy is seeing off a third longtime cast member in as many years. Sara Ramirez is leaving Shonda Rhimes’ veteran ABC medical drama starring Ellen Pompeo after 10 seasons, with tonight’s Season 12 finale serving as her farewell episode.

“I’m deeply grateful to have spent the last 10 years with my family at Grey’s Anatomy & ABC, but for now I’m taking some welcome time off,” Ramirez said in a statement. “Shonda’s been so incredible to work for, and we will definitely continue our conversations! I send my love to Ellen, the rest of the cast & crew, and I look forward to always being a part of the Shondaland family! “

Ramirez, who plays Dr. Callie Torres, originally joined Grey’s in the final episodes of Season 2, becoming a series regular at the beginning of the third season. Her departure follows the recent exits of original cast members Sandra Oh in Season 10 and Patrick Dempsey’s shocking ouster in Season 11.

In tonight’s episode, Ramirez’s Callie heads off to New York City, a development that capped an extended story arc in which Callie battled ex-wife Dr. Arizona Robbins (Jessica Capshaw) over custody of their young daughter Sofia, a battle Callie had lost. Last week, Callie saw her most recent partner, Dr. Penelope Blake (Samantha Sloyan), leave Seattle for a fellowship in New York, and tonight Arizona offered Callie a shared custody arrangement, presenting Callie with airplane tickets and saying that little Sofia deserves “two happy moms.”

Over the years, Ramirez’s character has been both thorn and rose to many of her medical colleagues. Brought on to the show by Rhimes as a recurring – and not always likable – character in the second season, Callie was first a love interest for T.R. Knight’s George O’Malley before embarking on a relationship (and parenthood) with Eric Dane’s Mark Sloan. Her strongest and most popular love interest, though, was Capshaw’s Arizona, and tonight’s episode saw a friendly, if not a romantic, reconciliation between the two.

“Dr. Callie Torres came into our lives dancing it out in her underwear almost a decade ago, and I could not be happier or more proud of her journey,” Rhimes said. “Sara Ramirez’s performance inspired me as well as millions of fans each week. We wish her the best on her well-deserved time off. I will miss Callie tremendously, but am excited for what the future holds for Sara. She will always have a home at Shondaland.”

Ramirez fueled speculation that she may be leaving Grey’s with a cryptic tweet last month when Grey’s wrapped production on Season 12.

Ramirez is one of several Grey’s cast members whose contracts are up at the end of this season, along with star Pompeo; Justin Chambers, who had stated that he was coming back; Chandra Wilson; James Pickens Jr.; and Kevin McKidd. All had been negotiating and looking promising, though no one is confirmed yet for next season.