LOS ANGELES — Quarterback Patrick Mahomes threw a record-tying four touchdowns in the second quarter as the Kansas City Chiefs roared back from a 24-0 deficit and defeated the Houston Texans 51-31 in the NFL playoffs on Sunday.

Green Bay also advanced, holding off the Seattle Seahawks 28-23 behind Aaron Rodgers’ two touchdown passes to Davante Adams. The Packers will visit the top-seeded San Francisco 49ers for the National Football Conference (NFC) championship.

Mahomes, the NFL’s most valuable player for the 2018 season, added a fifth touchdown pass in the fourth quarter as the Chiefs advanced to the American Football Conference championship game, where they will play the visiting Tennessee Titans.

The sixth-seeded Titans have beaten the number two seed Chiefs four consecutive times over the last six seasons, including a 35-32 win in November.

Mahomes had 321 yards passing and rushed for 53 more to help Kansas City score points on seven consecutive drives.

He joined former Washington Redskins quarterback Doug Williams as the only players to have four touchdown passes in a single quarter in a postseason game, the NFL said.

“Obviously we didn’t start the way we wanted to,” Mahomes said, “but we found a way.”

Tight end Travis Kelce caught three of Mahomes’ passes for touchdowns in the second period, a playoff record, despite a hamstring injury.

“I told him, ‘You are a monster, man,’” Mahomes said of Kelce, who had 134 yards receiving on 10 catches. “He was fighting through injury and still making plays all day long.” Running back Damien Williams also had three touchdowns, one on a pass from Mahomes and two on third-quarter runs. Houston, after its explosive start, scored only seven points in the second half.

Texans quarterback Deshaun Watson rushed five yards for their last score and passed for two touchdowns in the first half.

He had 388 yards passing but could not overcome the Kansas City show.

Kansas City’s mistakes helped Houston build its 24-0 lead.

Watson hit Kenny Stills with a 54-yard strike for the opening score. Then the Texans defense did its part.

Keke Mingo’s blocked punt led to Lonnie Johnson’s touchdown and minutes later Keion Crossen jumped on Kansas City returner Tyreek Hill’s muffed punt, leading to Watson’s touchdown pass to Darren Fells.

The Texans pushed the lead to 24-0 on a field goal, but the next 41 points belonged to Kansas City.

Green Bay Packers quarterback Aaron Rodgers aims to throw the ball against the Seattle Seahawks in the first quarter of a NFC Divisional Round playoff football game at Lambeau Field. — BENNY SIEU-USA TODAY SPORTS

Mahomes connected with Williams for a 17-yard touchdown and Kelce for scores of five, six and five yards. In nine minutes, the Chiefs had a 28-24 lead.

Williams added two more scores in the third quarter as Kansas City broke the game open on his runs of one and five yards.

Blake Bell caught the final touchdown pass from Mahomes, an eight-yarder in the fourth quarter.

In Green Bay, Adams powered the Packers offense, catching eight passes for 160 yards as Rodgers threw for 243 yards.

Adams caught a 20-yard pass from Rodgers for the game’s first score and later hauled in a 40-yarder that pushed Green Bay ahead 28-10.

“He had an unbelievable night,” Rodgers said. “He carried us on offense. His route running ability was incredible.”

Adams also caught a 32-yard pass on third down that kept the ball in Green Bay’s hands in the closing minutes.

The Seahawks made it interesting, though, scoring the final two touchdowns.

Russell Wilson connected with Tyler Lockett on a seven-yard scoring pass and Marshawn Lynch bulled his way in from the one,

But the Seahawks, despite Wilson’s 277 yards passing and 64 rushing, could not overtake the Packers.

The Kansas City Chiefs and San Francisco 49ers each opened as a favorite by a touchdown or more as they prepare to host their conference championship games next Sunday.

The second-seeded Chiefs, who rallied from a 24-0 deficit to beat Houston 51-31 at home on Sunday afternoon, were 7.5-point favorites over the Tennessee Titans at DraftKings and FanDuel sportsbooks, while PointsBet had the line at -8.5. All three sportsbooks had the money line on Kansas City between -340 and -370.

The sixth-seeded Titans routed top-seeded Baltimore 28-12 on Saturday night, after taking down New England in Foxborough, Mass., last week. They upset the Chiefs 35-32 in Tennessee on Nov. 10.

The NFC’s top-seeded 49ers, meanwhile, were favored by exactly seven points at all three outlets against the second-seeded Green Bay Packers, who beat Seattle 28-23 on Sunday night. The money line on the 49ers ranged from -310 to -323. — Reuters