Dan Orlovsky and Marcus Spears believe the dominance of Lamar Jackson and the Ravens is too much even for the red-hot 49ers. (0:45)

As the Baltimore Ravens and San Francisco 49ers head into Sunday's matchup as the two most run-heavy attacks in the league, they've helped alter the perception of what offense must be in today's NFL.

The Ravens and 49ers are two of the best teams in the league -- a combined record of 19-3 -- and they're getting the job done in generally similar ways: by pounding teams on the ground and playing good defense.

Ravens offensive coordinator Greg Roman was the architect of the Niners' offense when it had Colin Kaepernick and Frank Gore as focal points. Some of the lessons in power running combined with designed quarterback runs translate directly to what Roman is doing with Lamar Jackson & Co.

Meanwhile, 49ers coach Kyle Shanahan incorporates many of the concepts that Gary Kubiak once leaned so heavily on in Baltimore, though Shanahan and run game coordinator Mike McDaniel are proving far more flexible than many of their outside zone predecessors once were.

They're even open to watching what Roman and the Ravens are doing for possible wrinkles to add to their own system, with one notable exception.

"We watch stuff sporadically just to get ideas and stuff and some run looks and things like that," Shanahan said. "Don't do a lot of that with the Ravens, because I don't want to be tempted to use our quarterback that way. Not because I don't believe in it, because I don't think that's his area of expertise. ... They do some real cool stuff, stuff that's real interesting."

All of it adds up to a pair of running games that specialize in diversity but go about it in different ways. Here's a closer look, complete with analysis from ESPN NFL analyst Matt Bowen.

Ravens

The Ravens have the NFL's best running game in over four decades, thanks to one of the most unique talents in NFL history.

"It starts with Lamar [Jackson]," said Marshal Yanda, a seven-time Pro Bowl guard. "He puts a lot of stress on every single defense, just because of his run threat ability as a quarterback. So that's a complementary system where you have to account for him No. 1."

On a traditional running play, the defense has the numbers advantage because the quarterback is out of the play once he hands the ball off. With Jackson's ability to hit the edge and break a 20-yard run, Baltimore gains the edge because a defense typically has to assign a spy on him.

His speed strikes fear in teams. Since the start of last season, Jackson has had 122 rushes reaching a maximum speed of at least 15 mph -- 31 more than any other player in that span, according to Next Gen Stats data.

The Lamar Effect is dramatic. In the first nine games last season with Joe Flacco as the starting quarterback, the Ravens had the sixth-worst rushing attack, averaging 92.6 yards per game. In 18 games since with Jackson as the starter, Baltimore has the top running game, producing 217.9 yards per game.

"There are times where they have two guys committed to him and he just outruns them," Patriots safety Devin McCourty said. "There's times they're in zone and you still have a guy in your zone. So that leaves one guy playing the guy in the zone, so that leaves one guy with eyes on Lamar Jackson to get him down, and he makes them miss and now he's gone."

Roman is an expert when it comes to tailoring a game plan around a mobile quarterback. Besides his work in San Francisco with Kaepernick, the Ravens' offensive coordinator put together a game plan that helped Tyrod Taylor get to the Pro Bowl with the Buffalo Bills in 2015.

A focal point for all of those quarterbacks is deception. The Ravens run the option more than twice as much as any other team in the league, and that's why Jackson made a concerted effort to improve his ballhandling.

Jackson has perfected the exchange (or the illusion of it) where he holds the ball up to the belly of running back Mark Ingram II. He has faked out defenders along with cameramen with how he executes the run option.

Get the best of ESPN sent to your inbox The ESPN Daily delivers the biggest sports news and moments every weekday. Sign me up! Email:

"Half of the time, I didn't know who had the ball," said Rams safety Eric Weddle, who is known for being one the NFL's smartest players. "And so they were getting through the line and I had to go tackle them. So it just puts a lot of pressure on you."

Roman applies plenty of mental and physical pressure on teams. The Ravens keep defenders thinking with their array of motion and personnel groupings.

There are times when Baltimore will line up nine big-bodied blockers (five offensive linemen, three tight ends and one fullback) and shove defenses backward.

"We don't want to narrow ourselves to say, 'We're only doing this' or 'We're only doing that,'" Roman said. "Let's roll the balls out there, see what the guys can do and see who steps up and progresses."

The Ravens have the third-most rushing yards through 11 games in the Super Bowl era. The last team to total this many rushing yards was the 1975 Buffalo Bills, led by running back O.J. Simpson.

Asked if he enjoys hearing how fans talk about the Baltimore ground attack, Roman said, "How do I answer that? Yeah, it's cool. Anytime the players execute whatever you're doing, it's cool. It's really cool." -- Jamison Hensley

Bowen's breakdown

Play: QB keep/wrap

Analysis: The Ravens will utilize their QB-designed run package with Lamar Jackson (No. 8) out of multiple personnel groupings, with misdirection to influence opposing defenses. This allows offensive coordinator Greg Roman to consistently put defenders in conflict, while getting plus one with Jackson carrying the ball.

Here, in the Week 6 game versus Cincinnati, the Ravens have 11 personnel on the field, with tight end Nick Boyle (No. 86) aligned in the backfield to create a two-back Pistol set. Off the jet motion from wide receiver Willie Snead IV (No. 83), Jackson rides running back Mark Ingram (No. 21) through the mesh point on the inside zone run action.

This forces the unblocked defensive end to close, with both Snead and Boyle now wrapping to the play side as lead blockers. That puts Snead in a position to lead on the linebacker, with Boyle working up to the safety. This creates an open lane for Jackson to pull the ball and cut up into the open field -- where his natural athletic traits and explosive run ability take over. -- Matt Bowen

49ers

Fullback Kyle Juszczyk was first introduced to the intricacies of the Shanahan-family run philosophy while playing for Kubiak in Baltimore.

Kubiak, who coached under Kyle's father, Mike, with the Denver Broncos, was an outside zone zealot and gave Juszczyk what he now calls the "101 package," an introduction to the Shanahan run game.

Now in his third season playing for Kyle Shanahan in San Francisco, Juszczyk is an integral part of the graduate-level classes he likes to call the "404 Kyle Shanahan package."

Make no mistake, at the heart of the Niners' run game is the outside zone, a scheme that asks all 11 players to move in a well-choreographed dance that requires as much continuity as possible.

It's what the Niners are built for -- with a combination of speedy, elusive running backs, athletic offensive linemen and skill position players who are physical and willing blockers.

"I think that's the difference between us and a lot of the teams is the involvement of everyone," Juszczyk said. "Literally all 11 guys are involved in the run game."

Juszczyk isn't exaggerating. The Niners' rushing attack comes with many subtle nuances.

On a given play, a wide receiver might go in motion and give a small jab step in a certain direction to coax the defensive end into a faulty step that could take him out of the play. Or Juszczyk might be asked to go in motion and look in a certain direction in an effort to force a linebacker into a false sense of where Juszczyk is headed at the snap.

Sometimes, the Niners purposely put themselves in blocking matchups that look bad on paper -- it's not unusual for receiver Deebo Samuel to block a much bigger defender like Arizona's Chandler Jones -- but create matchup advantages elsewhere.

Then there's the area where the Niners are quite similar to the Ravens: their heavy reliance on pre-snap motions that can create communication chaos for the defense.

Tevin Coleman has rushed for 448 yards and six touchdowns this season as part of the 49ers' balanced run attack. Thearon W. Henderson/Getty Images

San Francisco uses pre-snap motion on 71% of its rushing attempts. On those plays, the Niners have averaged 105.2 rushing yards per game with 11 touchdowns. They're second to the Ravens in all three categories.

Quarterback Jimmy Garoppolo isn't exempt either. In most cases, the Niners will have two plays called when they leave the huddle, with multiple offshoots that could happen depending on what the defense shows.

It's up to Garoppolo and the line to scan the defense, looking for potentially favorable matchups to run at, certain safety rotations, the linebacker alignment or any other number of things that could lead to checking to another play.

During training camp, the Niners installed a massive menu of run plays, which serves as the base during the season. Each week, Shanahan and McDaniel piece together the game plan, choosing what they want and garnishing it with little twists based on opponent.

"I don't think you can truly appreciate how much goes into it without sitting in those meetings and really seeing what we're doing," Juszczyk said.

With Shanahan, McDaniel, the coaching staff and many key offensive pieces now in their third year together, the menu has expanded. Shanahan & Co. still lean on outside and inside zone concepts but never hesitate to innovate on the fly.

For example, the Niners have incorporated more power (or gap) blocking into the mix, something that was previously unheard of for a Shanahan offense. In Week 2 against Cincinnati, the Niners hammered the Bengals with gap looks on the way to 259 yards on 42 carries.

Soon after, Shanahan told his team he had run similar plays about seven times in 12 years calling plays. They ran counter plays out of gap schemes at least that many times in just two weeks.

"I think teams expect us to come out there and run the wide zone because that's what we are -- it's what we are really built for," Juszczyk said. "But the fact that we're able to do both, I think, sets us apart." -- Nick Wagoner

Bowen's breakdown

Play: Counter Zone Lead

Analysis: The 49ers are a core outside zone run team under Kyle Shanahan out of 21 personnel (2 RB, 1 TE, 2 WR) with fullback Kyle Juszczyk (No. 44) in the game. However, Shanahan has created misdirection off the outsize zone run path this season with his counter zone lead scheme. This allows the 49ers to force opposing linebackers to flow strong, with Juszczyk leading off the counter look to kick out the play-side defensive end or outside linebacker, creating the natural cutback lane for the back off zone blocking up front.

In this example, from the Week 10 game versus Seattle, the 49ers use short "hop" motion with Juszczyk to create a weak "I" set -- with Seattle rolling a safety to create an eight-man front. As quarterback Jimmy Garoppolo (No. 10) opens to the weak side, with running back Tevin Coleman (No. 26) and Juszczyk on the zone run path, the 49ers can force the linebackers to flow weak while leaving the backside defensive end unblocked.

However, with the 49ers getting the double team on the backside defensive tackle and the tight end climbing to fit up on the linebacker, both Coleman and Juszczyk can wrap to the strong side of the formation. That allows Juszczyk to kick out the defensive end, which puts Coleman in a position to cut up the field inside of the rolled-down safety -- who he must account for in the run scheme. This leads to an open rush lane and a 22-yard run for Coleman off the misdirection zone scheme. -- Bowen