Jacksonville Jaguars quarterback Blake Bortles (5) looks as Baltimore Ravens outside linebacker Terrell Suggs (55) closes in for a sack during the second half of an NFL football game in Baltimore, Sunday, Dec. 14, 2014. The Ravens defeated the Jaguars 20-12. (AP Photo/Patrick Semansky)

The Ravens defense sacked rookie quarterback Blake Bortles a season-high eight times in a 20-12 win over the Jacksonville Jaguars on Dec. 14 at M&T Bank Stadium in Baltimore.

It wasn’t the Ravens’ prettiest win of the season, but still turned out to be a valuable one as a stingy defense pulled off a victory crucial to Baltimore maintaining control over their own destiny in the AFC playoff hunt. Baltimore entered the matchup with Jacksonville knowing that if they won all three of their remaining regular season games they would earn, at minimum, a wild card berth, and could win the AFC North division and one of the top four AFC seeds.

Despite a woeful season, Jacksonville (2-12) didn’t make it easy for Baltimore. The Jaguars ran the ball well early in the game and converted four first half field goals, including two 53-yard attempts, to take a 12-10 lead into halftime. Jacksonville also played strong defense in the first half, holding the Ravens to just three points offensively. Baltimore’s only touchdown in the first half was scored off a blocked punt by reserve safety Darian Stewart that was scooped up and returned by reserve receiver Kameer Aiken.

Joe Flacco

Baltimore Ravens quarterback Joe Flacco (5) looks down the lines during the second half of an NFL football game against the Jacksonville Jaguars in Baltimore, Sunday, Dec. 14, 2014. The Ravens defeated the Jaguars 20-12. (AP Photo/Patrick Semansky)

The Ravens took control of the game in the second half with stout defense. Bortles was sacked eight times by Baltimore, led by linebacker Terrell Suggs with two and a half sacks; rookie defensive tackle Timothy Jernigan followed up with two sacks and defensive end Pernell McPhee added one and a half. Rookie linebacker C.J. Mosley also had a sack, as did outside linebacker Elvis Dumervil, who extended his Ravens’ franchise single-season sack record to 17.

Bortles completed 21 of 37 passes for 210 passing yards, no touchdowns and an interception by Ravens safety Jeromy Miles.

Ravens quarterback Joe Flacco overcame his slow start to the game to complete 20 of 30 passes for 221 yards and a touchdown pass to veterantight end Owen Daniels. Flacco’s passer rating was 99.4. Ravens’ running back Justin Forsett was contained for most of the game by the Jags; he ran for just 48 yards on 16 carries.

Marlon Brown, Josh Evans

Baltimore Ravens wide receiver Marlon Brown (14) spins around Jacksonville Jaguars free safety Josh Evans (26) during the second half of an NFL football game in Baltimore, Sunday, Dec. 14, 2014. (AP Photo/Patrick Semansky)

Second-year receiver Marlon Brown led Baltimore with five catches for 66 yards and veteran receiver Steve Smith Sr. added five more catches for 37 yards; Smith’s five catches put him into the elite club of receivers with 900 or more catches during their NFL career; he became just the 18th player ever to reach that mark, with 902 catches during his 15-year career.

Baltimore now carries a 9-5 record with two more games left on their schedule, guaranteeing the Ravens will finish with a winning record. That accomplishment gives the Ravens six winning seasons during John Harbaugh’s seven-year tenure as head coach. Harbaugh’s only season in which the team didn’t win nine games or more came in 2013, when the team finished with an 8-8 record.

Next: The Ravens will travel to Houston to face the Texans (7-7) on Dec. 21. Kickoff is set for 1 p.m.