LOS ANGELES — Raheem Mostert rushed for four touchdowns as the San Francisco 49ers beat Green Bay 37-20 to book a spot in the Super Bowl where they will face Kansas City, who advanced to the NFL championship game for the first time in 50 seasons with a 35-24 win over Tennessee on Sunday.

Kansas City quarterback Patrick Mahomes was instrumental in their victory in the American Football Conference championship game, breaking the Titans’ backs with a dazzling 27-yard first-half touchdown run as the Chiefs overcame a 10-0 deficit.

Mahomes, who also threw three touchdown passes, gave the Chiefs their first lead at 21-17 with the tackle-breaking run with 11 seconds left in the opening half.

They went on to dominate the second half, chalking up their eight consecutive win to earn a berth in Feb. 2 Super Bowl to be played in Miami.

Kansas City has not been to the title game since January 1970 when they defeated the Minnesota Vikings 23-7 in the fourth Super Bowl.

“It’s amazing. It really is,” Mahomes said.

“To be here, to be a part of Chiefs Kingdom and to be able to do it here at Arrowhead, these people deserve it. And, we’re not done yet. We are going to get it (the Super Bowl title).”

Tennessee, the surprise package of the playoffs with a sixth seed, scored the game’s first 10 points on a field goal and Derrick Henry’s four-yard run.

But the Chiefs, as they had in overcoming the Houston Texans’ 24-0 advantage last weekend, rallied behind their quarterback.

Mahomes’ toss to wide receiver Tyreek Hill on a jet sweep brought the Chiefs within 10-7 before Tennessee scored on a one-yard pass from Ryan Tannehill to massive tackle Dennis Kelly.

The Chiefs rolled for the next 28 points.

Hill caught 20-yard pass from Mahomes and the quarterback added his key touchdown run, tiptoeing along the sidelines at times.

“When they are getting double-teamed and there are only three men rushing, and our line are blocking, it gives me room where I can run,” Mahomes said.

Damien Williams then rushed into the end zone on a three-run and Mahomes threw his third touchdown of the game on a 60-yard play to Sammy Watkins. Tennessee finally showed signs of life on Tannehill’s 22-yard pass to Anthony Firkser with four minutes left, but it was too late for the Titans.

In the National Football Conference championship game in San Francisco, the 49ers relied on the running game to build a 27-0 lead and took a 34-7 lead into the fourth quarter.

Mostert became the first NFL player with four rushing touchdowns in a conference championship game as he scored on runs of 36, nine, 18 and 22 yards, running for 220 yards in total.

Green Bay quarterback Aaron Rodgers, who had 326 yards passing but was intercepted twice and lost a fumble, rallied the Packers to within 34-20 as they scored twice to open the fourth.

But Robbie Gould’s third field goal for San Francisco ended the scoring.

Raheem Mostert rushed for a franchise-record 220 yards and scored four touchdowns, and the San Francisco 49ers pummeled the Green Bay Packers on both sides of the ball to notch a 37-20 victory on Sunday in the NFC Championship Game at Santa Clara, Calif.

Mostert’s historic showing was part of a dominating performance, as San Francisco reached the Super Bowl for the first time since the 2012 season and the seventh time overall. The 49ers will face the Kansas City Chiefs in Super Bowl LIV in Miami on Feb. 2.

Mostert’s rushing output, which came on 29 carries, is the second highest in NFL postseason history behind Eric Dickerson (248 in the 1985 postseason). The four rushing scores ties with LeGarrette Blount (2013) for second, one behind record-holder Ricky Watters of the 49ers (1993).

Aaron Rodgers completed 31 of 39 passes for 326 yards, two touchdowns and two interceptions for the Packers. Aaron Jones scored two touchdowns (one rushing, one receiving), and Davante Adams caught nine passes for 138 yards.

It was the second time the 49ers easily handled the Packers this season. San Francisco won 37-8, also at home, on Nov. 24.

Mostert rushed for 160 yards and three touchdown on 14 first-half carries — helping the 49ers to a 27-0 lead — en route to becoming just the eighth player to rush for 200 or more yards in a playoff game. His yardage was the highest ever by a San Francisco player, regular season and postseason (Frank Gore, 212 in 2006).

His load only increased after Tevin Coleman was carted off the field with a right shoulder injury during the second quarter and didn’t return.

Mostert began the scoring with 5:55 left in the first quarter when he exploded through a huge hole on third-and-8 and headed to the left for a 36-yard touchdown run. Robbie Gould kicked a 54-yard field goal on the first play of the second quarter to make it 10-0.

Mostert added a 9-yard scoring run to extend the lead to 17 with 9:12 left in the half. The Packers turned the ball over on their next possession when center Corey Linsley never got the snap to Rodgers, and San Francisco’s DeForest Buckner recovered at the 49ers’ 25-yard line. The ensuing drive was capped by Gould’s 27-yard field goal to make it 20-0 with 1:57 left.

Emmanuel Moseley intercepted Rodgers with 1:01 left in the half, and San Francisco cashed in when Mostert again raced through a big hole to score from 18 yards out with 45 seconds remaining.

Green Bay got on the board when Rodgers connected with Jones on a 9-yard scoring pass with 8:44 left in the third quarter.

Mostert was back at it less than four minutes later, as he darted 22 yards to the left for a touchdown to make it 34-7 before the Packers attempted to rally.

A 42-yard pass from Rodgers to Jimmy Graham set up Jones’ 1-yard scoring run 25 seconds into the fourth quarter. The two-point conversion pass failed. Rodgers connected with Adams on a 65-yard play to lead to a 8-yard touchdown throw to Jace Sternberger with 8:13 left.

Gould booted a 42-yard field goal with 3:31 left to make it a three-score game, and Richard Sherman later intercepted Rodgers as the 49ers finished off the victory.

San Francisco is 5-1 in its previous Super Bowl appearances. The defeat came in its most recent appearance, after the 2012 season.