INGLEWOOD, Calif. — The storylines were enough to fill a Hollywood script.

Ravens coach John Harbaugh facing off against little brother and Chargers coach Jim Harbaugh for a third time and the first since beating him in the Super Bowl a dozen years ago. A pair of ex-Baltimore running backs J.K. Dobbins and Gus Edwards seeking revenge against the team that jettisoned them. Ravens quarterback Lamar Jackson looking across the sideline at condemned former Baltimore offensive coordinator Greg Roman.

It all provided plenty of drama and possibilities at SoFi Stadium on Monday night.

Then, a plot twist.

With the Ravens trailing the Chargers, 10-7, in a critical AFC showdown and facing fourth-and-1 from their own 16-yard line late in the second quarter, John Harbaugh went against conventional wisdom and decided to gamble. The analytics favored the choice, but reality painted a potentially disastrous outcome had they not converted.

After quarterback Lamar Jackson tried to draw Los Angeles offside before the two-minute warning, the Ravens’ punt team started to come onto the field before things took a turn. Tight end Mark Andrews took the snap from under center, running back Derrick Henry and fullback Patrick Ricard pushed from behind and Baltimore picked up 2 yards and the first down.

“I told him I’m gonna push the [crap] out you,” said Henry, who is usually the one with the ball in his hands. Instead, he had his tight end’s backside. “He said to me after ‘I felt ya.'”

And the Ravens had plenty of reason to feel good, too.

Three plays later, wide receiver Zay Flowers caught a short pass, cut back across the defense and gained 22 yards. Two plays after that, Jackson threw deep down the left sideline for a well-covered Rashod Bateman, who fended off Kristian Fulton and hauled in the 40-yard touchdown strike.

The score gave Baltimore its first lead of the night as it shook off a sluggish start and turned the momentum in Harbowl III as the Ravens (8-4) pulled away from the Chargers (7-4) for a 30-23 victory.

“It was just gutsy,” center Tyler Linderbaum said of the fourth-down call. “Credit to Coach to having trust in us to get the job done and credit to all 11 guys on the field to get that first down. It was definitely a big momentum swing.”

“That, I think, changed the game,” added Ricard. “It changed momentum for us going into the second half.”

The win keeps Baltimore within a half-game of the first-place Pittsburgh Steelers in the AFC North. It also marked Harbaugh’s third victory over his sibling in as many meetings and the first since they last met in the Super Bowl in February 2013 when Jim was coach of the San Francisco 49ers.

“I just thought that [Andrews] and Tyler and our interior offensive line … I thought we could get it, and they did,” Harbaugh said of the call. “That was a big turning point in the game.”

And like any good plot line, a central tenet to the story.

Baltimore went for it on fourth down two more times on the night, including another in their own territory in the third quarter. They converted them all and along the way broke the will of their opponent.

“You do when you’re getting 5 yards a play, so just might as well keep running the same play over and over again,” Ricard said. “That’s what we were doing. We were flipping slides running the same play.”

And they bullied the Chargers right out of their building when it mattered most.

Clinging to a 17-16 lead late in the third after both teams had traded field goals and facing fourth-and-1 from their own 39, the Ravens didn’t hesitate. This time the call was more traditional, and Henry ripped off a 27-yard gain through the left side of the line.

Later in the drive and facing a fourth-and-1 from Los Angeles’ 25, Henry (24 carries for 140 yards) delivered again. Five plays later, Jackson hit Andrews in the back of the end zone for a 6-yard touchdown.

Rather than kick the extra point to extend the lead to eight points, however, the Ravens went for 2, but Jackson’s pass fell incomplete.

Unlike the Nov. 17 game against the Steelers, it didn’t matter.

After the Chargers went three-and-out on their next possession, running back Justice Hill took a handoff on third-and-3 and raced around the left end for a 51-yard touchdown that extended the lead to 30-16.

It was a stark contrast to most of the opening 30 minutes and especially the first quarter. The Chargers dominated in both yards and time of possession in the opening frame, outgaining the Ravens 123 yards to 20 and keeping the ball for more than 10 of the first 15 minutes, and took a 10-0 advantage early in the second.

“We started off very slow,” Jackson said. “We gotta get back in the grove starting our games off the correct way.

“The beginning of the season we were doing a great job of that. As the season gone on someway somehow we’ve been horrible starting the game.”

But soon after, the Ravens finally started to chip away on both sides of the ball.

On offense, they leaned on the long and strong legs of Henry, who came into the game second in rushing in the NFL and finally got going in the second quarter. Off right tackle for 19 yards. Off left tackle for 14 yards.

Then Jackson and Andrews ad-libbed to convert a third-and-5 before Henry ripped off another chain-moving run, this one for 11 yards.

A penalty for illegal formation on right tackle Roger Rosengarten wiped out Henry’s 5-yard touchdown run one play later, ending his streak of consecutive games with at least one touchdown at 11, but Jackson made up for it by racing to the pylon for a 10-yard score.

That cut the deficit to 10-7, and the decision to go for it on fourth down from deep in their own end on the next possession paid off. Baltimore marched 93 yards in eight plays and was on its way.

Then the defense, which has been prone to giving up big plays and blowing big leads and was without All-Pro inside linebacker Roquan Smith because of a hamstring injury, did the rest.

The Chargers were held to just 10 points in the second half and quarterback Justin Herbert finished 21-for-36 for 218 yards with a touchdown, scoring the game’s first points on a 5-yard run.

Malik Harrison, who along with Kristian Welch filled in for Smith, did most of the damage with a team-high 13 tackles. He was all over the field for Baltimore, playing inside and on the edge and on special teams.

“Knowing that the possibility that Ro’s gonna be out I just had the mindset that I was going to go out there and start,” Harrison said. “I prepared my [butt] off all week.”

And he helped eliminate any opportunity for ex-Ravens Dobbins and Edwards to exact revenge.

Dobbins finished with 40 yards on six carries before exiting late in the second quarter with a knee injury. Edwards had just 11 yards on nine carries and a touchdown in the final minute.

Jackson, meanwhile, had just 177 yards but was efficient, completing 16 of 22 passes with two touchdowns and no turnovers. He improved to 18-4 in his career in games after a loss.

“Being down 10 early there was just belief,” Andrews said. “Believe that we’re gonna get things going and get things rolling. We’ve got so many playmakers that are able to step up and make big plays when they matter. It was countless today of guys making big-time plays, big-time catches, big-time runs over and over to advance the ball.”

Have a news tip? Contact Brian Wacker at bwacker@baltsun.com, 410-332-6200 and x.com/brianwacker1.