The Baltimore Ravens announced that head coach John Harbaugh will be retained for the 2019 season, and that they're working on a contract extension to keep him on beyond next year.

This news caught many by surprise, considering that all signs pointed to Harbaugh leaving after this season. Jason La Canfora of CBS Sports reported last month that the two parties were likely to mutually part ways after the season, with the chances of Harbaugh returning for 2019 "quite bleak.'

That report from La Canfora came when the Ravens were 4-5 and looked destined for a fourth consecutive non-playoff season. But with rookie quarterback Lamar Jackson stepping in and fixing the offense, Baltimore has gone 4-1 ever since, and they need just two more wins to secure a playoff spot.

Thanks to Baltimore's recent resurgence, it appears that both Harbaugh and the front office decided that it's beneficial for both sides to maintain this partnership. The Cincinnati Bengals were expected to move on from Marvin Lewis after the 2017 season, but the two sides wound up agreeing to a two-year extension instead.

 RELATED: JOE FLACCO TO LEAVE RAVENS

Credit: Jeremy Brevard-USA TODAY Sports

The Ravens currently have the best defense in the NFL, allowing the fewest yards (290.2), and points per game along with the Tennessee Titans (18.1). With Jackson helping this long-struggling offense find some steam,  the Ravens now have the makings to be a true title contender. Perhaps that's why they've decided to keep Harbaugh on board.

Baltimore has only endured one losing season under Harbaugh (2015). They've made the playoffs six times (he's 10-5 as their head coach in the postseason), with three AFC Championship Game appearances and a Super Bowl 47 title.

What This Means

It probably makes the most sense for Baltimore to keep Harbaugh, who remains one of the most respected and successful head coach of this era. Even though the Ravens have missed the playoffs in four of the last five years, they remain a consistent playoff contender. Again, they've only had one losing season under Harbaugh.

With Baltimore set to contend in 2018 and beyond, keeping Harbaugh is probably the safest choice for this front office to make.

NEXT: RE-DRAFTING THE ENTIRE 1ST ROUND OF THE 2018 NFL DRAFT