BALTIMORE — The Baltimore Ravens flipped the script and put one heck of an ending on a regular season that featured countless surprises and plot twists.

Getting two rushing touchdowns from rookie quarterback Lamar Jackson and a late defensive stand, Baltimore squeezed past the Cleveland Browns 26-24 Sunday to reach the playoffs as AFC North champions.

Kenneth Dixon accounted for 117 of Baltimore's season-high 296 yards on the ground, Jackson had 90 and the rejuvenated Ravens (10-6) broke a three-year playoff drought with their sixth win in seven games. Baltimore will open the post-season Sunday afternoon at home against the Los Angeles Chargers.

"It feels good, a home playoff game," cornerback Marlon Humphrey said. "Somehow it happened."

A year ago, Baltimore missed the playoffs by losing its finale at home to the Bengals, who rallied with a last-minute touchdown.

Remembering that disappointment, most of the announced crowd of 70,925 was on its feet as the Browns moved closer to field-goal range with the clock winding down. A 19-yard completion from Baker Mayfield to former Ravens top draft pick Breshad Perriman and a 16-yarder to Jarvis Landry pushed the ball to the Baltimore 39 with 1:20 left.

Following three straight incompletions, the Ravens blitzed Mayfield on fourth down and linebacker C.J. Mosley picked off a pass to clinch it. Baltimore finished a half-game ahead of the Pittsburgh Steelers, who beat Cincinnati 16-13.

"There were some nerves," tight end Hayden Hurst said. "I felt confidence that at some point one of those guys would make a big play and sure enough, C.J. did."

After killing off the final seconds, the Ravens danced into their locker room, donned caps proclaiming them AFC North champs, and mugged for selfies and shots of each other.

"If you want to write a book about this season, probably no one would believe it," coach John Harbaugh said.

It's been quite a turnaround for the Ravens, who were 4-5 before Jackson took over for injured Joe Flacco, the team's starting quarterback since 2008. Flacco was behind centre in 2012, when Baltimore captured its last division crown and ultimately won the Super Bowl.

The Jackson-led running attack was too much for Cleveland (7-8-1), which was denied its first winning season since 2007. After trailing 20-7 at halftime and 26-17 with 7:20 left, the Browns could not recover against the franchise that left Cleveland after the 1995 season.

Mayfield threw three touchdown passes — including a 48-yarder to Landry — to finish with 27, an NFL record for a rookie.

"I'll make sure I say something about it on the plane ride home," interim coach Gregg Williams said. "Everybody needs a pat on the back, even where you're as competitive as that young man. And he is competitive."

Although Mayfield pierced the NFL's top-ranked defence for 376 yards, he was intercepted three times.

"Obviously, very disappointed for us to not get the win, but it's a great team. It's a playoff team," Mayfield said. "We want to be in their spot this time next year."

Jackson gave Baltimore a 17-7 lead with touchdown runs of 25 yards and 8 yards , his first multi-score game in the NFL. Late in the first half, however, the former Louisville star lost a fumble when trying to reach over the goal line.

Jackson ran 20 times overall. As a passer, he went 14 of 24 for 179 yards.

"It's exciting to watch him play. He's a leader now," said Ravens rookie Gus Edwards, who chipped in with 76 yards rushing.

READY TO GO

Although he had already connected on four field goals, Justin Tucker was mentally preparing himself for a very long, hurried fifth attempt as he watched the Browns scramble downfield on their final drive.

"I was just doing the math in my own head anticipating that we were going to have to rebut with our own effort to put the game away and come out as AFC North champs," he said.

MILESTONES

LB Terrell Suggs set a Ravens record for games played with 229, breaking a tie with Ray Lewis. It's also the sixth-most by a linebacker in NFL history. ... Mayfield has thrown a TD pass in 13 straight starts, the first Browns QB do so in a single season since Frank Ryan in 1966. ... Baltimore earned its 200th regular-season win. ... The Ravens capped their sixth 10-win season in 11 years under Harbaugh.

INJURIES

Browns: DL Larry Ogunjobi was evaluated for a concussion and cleared to return in fourth quarter. ... DB Damarious Randall missed time in the third quarter with cramps.

Ravens: OL Alex Lewis missed a fourth straight game with a shoulder injury.

UP NEXT

Browns: First priority during the off-season is to decide whether Williams sheds the interim label as head coach or if someone else gets the job.

Ravens: Face the Chargers, a team they beat 22-10 last weekend.

___

More AP NFL: https://apnews.com/NFL and https://twitter.com/AP_NFL