BALTIMORE -- Lamar Jackson was electrifying in his first career start.
The rookie quarterback set a franchise record with 117 yards rushing and the Ravens snapped a three-game losing streak with a critical 24-21 victory over the Cincinnati Bengals on Sunday.
The Ravens and Bengals are tied for second in the AFC North at 5-5 and still alive in the AFC playoff hunt.
"I'm proud of our guys, they have a lot of fight," Ravens head coach John Harbaugh said. "Tough game. I thought we played really well. The Bengals always make plays like they always do. Much respect to their football team. Lamar Jackson led us to victory."
Jackson also completed 13-of-19 passes for 150 yards with an interception.
"I didn't envision the game being that close," Jackson said. "I didn't think I would run the ball that much, but whatever it takes to win."
Fellow rookie Gus Edwards also had a breakout performance, finishing with 115 yards on 17 carries with a touchdown. It was the first time Baltimore had a pair of 100-yard rushers in a game since Dec. 23, 2012 against the New York Giants.
Overall, Baltimore had 265 yards rushing, which helped the team avoid its first three-game home losing streak since 2007.
"I knew if I got my opportunity, I had to make the best of it," Edwards said. "That's how I go through every week -- make the best out of every opportunity I get."
Jackson threw his first interception to Bengals safety Shawn Williams on the opening drive of the third quarter. That miscue set up a 4-yard touchdown pass from Dalton to Matt Lengel and the Bengals had their first lead 14-13.
After Jackson failed to convert a 4th-and-1 from midfield, the Bengals took advantage again. This time, John Ross caught a 22-yard touchdown pass from Dalton.
The Ravens tied the game 21-21 on an 11-yard touchdown run and 2-point conversion by Edwards. Justin Tucker converted a 24-yard field goal that provided the Ravens with a 24-21 lead with 8:12 left in the game.
Bengals kicker Randy Bullock missed a 52-yard attempt wide right with 3:59 remaining.
Last season, the Ravens secondary surrendered a 49-yard touchdown pass from quarterback Andy Dalton to Tyler Boyd on a 4th-and-12 in the final minute that gave Cincinnati a 31-27 victory, allowing the Bengals to overtake the Ravens for the postseason.
This time, Cincinnati got the ball back in the final minutes, but Dalton's pass attempt to Cody Core was broken up by Ravens cornerback Marlon Humphrey on 4th-and-3 and Baltimore was able to run out the clock.
"I thought we were going to go down and score, just like we have in other games this season" Dalton said. "We were close. We didn't get it done, but everyone had a feeling we were going to get a late score."
Dalton was 19-of-36 for 211 yards with a pair of touchdowns. Boyd had four receptions for 71 yards.
Jackson ran five times for 46 yards and did not attempt a pass on the Ravens first series. Baltimore took the early lead on a 7-yard touchdown run by Alex Collins.
The Ravens became the third team since 1999 to score a touchdown on an opening drive that featured at least 10 rushing plays without a pass attempt, according to the NFL communication department.
"This guy is very unpredictable," Bengals linebacker Vontaze Burfict said about Jackson.
Boyd beat Ravens cornerback Tavon Young for a 29-yard reception from Dalton. Four plays later, Joe Mixon tied the game 7-7 on a 1-yard run.
Baltimore regained the lead 13-7 at the half off a pair of field goals by Justin Tucker from 28 and 56 yards.
"We had opportunities but we didn't take advantage of them," Bengals head coach Marvin Lewis said. "We have to take full advantage, but we learn."