As longtime star Andrew Lincoln made his final appearance on The Walking Dead on Sunday, Rick Grimes' farewell gave the AMC drama its highest ratings yet this season.

Season 9's fifth episode, which marked the departures of Lincoln and co-star Lauren Cohan, brought in a total of 5.4 million viewers, with a rating of 2.7 among the key demographic of adults aged from 18-49. That's a 6 percent increase in both total viewers and the ratings from the previous week's episode, and the largest audience of the season to date.

RELATED: Walking Dead Teaser Quietly Reveals the Show’s New Villains

Going into its current season, the series has struggled with a ratings decline, earning a 2.5 rating for its premiere last month, which marked the lowest season opener for the survival horror series. Later, the series reached an all-time low in ratings for the series to date with the ninth season episode "The Bridge" garnering 4.9 million viewers and a rating of 2.0 even.

RELATED: Wait, Did The Walking Dead Just Rickroll Us?

While this week's episode marked the end of Lincoln and Cohan's tenures on the series for the foreseeable future, showrunner Angela Kang has confirmed the door is open for Cohan's potential return as Maggie Rhee while Lincoln will reprise the role of Rick Grimes in a trilogy of television films for AMC.

Airing Sundays at 9 p.m. ET/PT on AMC, The Walking Dead stars Norman Reedus, Danai Gurira, Melissa McBride, Lennie James, Alanna Masterson, Josh McDermitt, Christian Serratos, and Jeffrey Dean Morgan.

(via The Wrap)