The Doctor is out, longtime star Jesse Williams exits ABC's medical drama.

Dr. Jackson Avery, Williams' character, is leaving "Grey's Anatomy" after 12 seasons. The actor will appear for the last time on the May 20 episode titled "Tradition"

The actor first appeared on the show's 6th season as a recurring character and was later on promoted as series regular the following year.

ABC revealed the reason for the actor's exit is the end of his two-year contract at the end of the 17th season which was not renewed. Williams shared his statement in a Variety article "I will forever be grateful for the boundless opportunities provided me by Shonda, the network, studio, fellow cast mates, our incredible crew, Krista, Ellen and Debbie." the actor said.

READ NOW: 'Stranger Things' Season 4 Teaser: All The Easter Eggs Pointing to Rainbow Room, Possible Scenarios 

Williams also thanked his fans' endless support by adding "As an actor, director and person, I have been obscenely lucky to learn so much from so many and I thank our beautiful fans, who breathe so much energy and appreciation into our shared worlds. The experience and endurance born of creating nearly 300 hours of leading global television is a gift I'll carry always. I am immensely proud of our work, our impact and to be moving forward with so many tools, opportunities, allies and dear friends."

In a statment to Deadline, Krista Vernoff, the medical drama's showrunner, also shared her sentiments "Jesse brings so much heart, such depth of care, and so much intelligence to his work. We will miss Jesse terribly and we will miss Jackson Avery - played to perfection for so many years." she stated.

What will happen to Dr. Jackson Avery's character? (SPOILERS AHEAD)

Jackson Avery's farewell started in the last episode titled "Look Up" when he visited his father Robert, played by Eric Roberts. He also had an emotional conversation with his ex April, played by Sarah Drew.  

Jackson will takeover his family foundation in exchange of equity. In order for him to focus on the foundation, he is set to move to Boston together with April, April's husband Matthew (Justin Bruening), and his daughter Harriet for him to be there fulltime for his daughter.

Besides acting, Williams also branched out by directing numerous episodes of the same program. The actor also produced "Two Distant Strangers" which won at the Academy Awards for live-action short film.

Williams is the 10th original cast member to exit the show. 

READ ALSO: Tristan Thompson Threatens to Sue 'Liar' Sydney Chase For Malicious Defamatory Fabrications