April 21 (UPI) -- The Resident star Shaunette Renée Wilson has left the show after four seasons.
Tuesday's episode marked Wilson's final appearance as Mina Okafor on the Fox medical drama.
The episode showed Okafor leave Chastain Park Memorial Hospital to return to her native Nigeria. Okafar left just as her relationship with AJ (Malcolm-Jamal Warner) was getting serious.
Wilson announced her exit on Twitter before the episode airing.
"After deeply thoughtful reflection, I approached the producers some time ago asking to leave the show and they agreed -- and gave my character a wonderful sendoff," Wilson wrote. "I am appreciative of them for allowing me to embody as beautiful of a soul as Dr. Mina Okafor."
"I would also like to thank the studio, network, cast, crew and, most of all, the wonderfully dedicated fans of The Resident for their support over the last four seasons," she added.
Executive producer Andrew Chapman told Entertainment Weekly that Wilson is welcome to return to the show.
"We're all completely heartbroken," Chapman said. "We did not want her to leave. She was so foundational to the DNA of the show. She was always so badass and a truth-teller.
"We are devastated to lose her, but we have told her the door is always open for her here. There's no ill will at all."