SANTA CLARA, Calif. (AP) — Coach Kyle Shanahan received the NFC championship trophy from his Super Bowl-winning father Mike and raised it to the sky.

The San Francisco 49ers have gone on a surprising journey from No. 2 pick in the draft to one of the last two teams standing. They have one of the most unlikely playoff heroes to thank for it.

Journeyman Raheem Mostert rushed for 220 yards and four touchdowns to make quarterback Jimmy Garoppolo mostly a spectator, Nick Bosa harassed Aaron Rodgers from the start and the 49ers beat the Green Bay Packers 37-20 for the NFC championship on Sunday.

“I did have a lot of doubters and naysayers,” said Mostert, who has been cut seven times in his career. “Now I get to actually tell them, ‘Look where I’m at now.’

“I never gave up on my dreams.”

The Niners (15-3) also had their skeptics after winning just 10 games in the first two seasons under Shanahan and general manager John Lynch.

But they put pieces and systems in place during those rough two seasons and now have advanced to the franchise’s first Super Bowl in seven years. The Niners will play the Kansas City Chiefs in two weeks in Miami when Shanahan tries to join his father as coaching champions.

“It was pretty special,” Shanahan said of getting handed the trophy from his father at the postgame ceremony. “To get a trophy handed to you by anyone is really cool. … It was pretty cool it happened there at the end.”

After giving a second thorough beating of the season to Rodgers and the Packers (14-4), the 49ers are the third team to make it to the Super Bowl a year after winning four or fewer games.

Cincinnati did it in 1988 and the Rams 1999, with the Rams the only team to go from four wins to a championship in one year.

“It’s still kind of surreal,” linebacker Fred Warner said. “With the stuff this team has gone through, this organization, it’s special. Its the pinnacle of football right here.”

Bosa, the prize for last year’s rough season as the No. 2 overall pick, helped set the tone when he ended Green Bay’s second drive of the game with a 13-yard sack of Rodgers.

Mostert, a former special teams standout, did much of the rest in a remarkable redemption story for a former surfer who carried the ball only eight times in his first three seasons in the NFL while bouncing between teams.

But he has become a key part of the NFC’s top team this year, leading the Niners with 772 yards rushing in the regular season and delivering a performance for the ages in the NFC title game.

He had the second-most yards rushing in a playoff game to Eric Dickerson’s 248 for the Rams on Jan. 4, 1986, and was the first player to rush for at least four TDs and 200 yards in a playoff game.

He got started when he burst 36 yards on a third-and-8 trap play to open the scoring on San Francisco’s second drive and kept ripping off long runs behind impressive blocking.

“He’s so fast,” tackle Joe Staley said. “He’s incredibly fast. He’s fearless going through the hole. He has trust in the linemen to block it up. He’s a great running back.”

He added TD runs of 9 and 18 yards in the second quarter and had 160 yards rushing at the half, becoming the only player in NFL history to rush for at least 150 yards and three TDs in the first half of a playoff game.

Mostert added a 22-yard TD run in the third quarter.

“The lanes that we saw and the way he was running we just wanted to keep feeding him,” Shanahan said. “I know he was feeling it. That wasn’t too hard to see.”

Rodgers and the Packers were unable to match that performance as they got overwhelmed by San Francisco’s dominant front for a second time this season.

Rodgers had a career-low 3.15 yards per attempt in a 37-8 loss here back in November and wasn’t much better in the first half of the rematch.

He lost a snap from center to end Green Bay’s only promising drive of the half, threw an interception to Emmanuel Moseley late in the half and didn’t convert his first third down of the season — in 18 attempts — against the Niners until connecting on a 6-yard pass to Aaron Jones on the opening drive of the second quarter.

“We just weren’t very consistent the first half,” Rodgers said. “Made a couple of mistakes personally that hurt us and kind of let it get away from us.”

Rodgers capped that drive with a 9-yard TD pass to Jones, but the game was too far out of hand by that point.

He led Green Bay to two more TDs and finished with 326 yards passing, but it wasn’t nearly enough as the Packers lost the NFC title game for the third time since their last Super Bowl trip following the 2010 season.

“Right now, they are the gold standard in the NFC,” Packers coach Matt LaFleur said of the 49ers.

QUIET DAY

The Niners asked very little of Garoppolo, who threw only eight passes thanks to the big-play running game and lopsided score. He went 24 minutes of game time between his sixth and seventh passes and finished with six completions for 77 yards. It was tied for the second fewest passes thrown in a playoff game. Miami threw six and seven passes on the Super Bowl following the 1973 season.

PASSING FAVRE

Rodgers’ two TD passes gave him 40 in his playoff career, breaking Brett Favre’s franchise record of 39. Rodgers also has seven straight playoff games with at least two TD throws, one shy of Joe Flacco’s record.

INJURIES

Packers: S Adrian Amos left after injuring his pectoral muscle in the first half. … CB Jaire Alexander left in the second half with a thumb injury.

49ers: RB Tevin Coleman left in the first half with a shoulder injury.

UP NEXT

49ers: The team’s seventh appearance in the Super Bowl against the Chiefs on Feb. 2.