MIAMI GARDENS, Fla. (AP) — Patrick Mahomes led Kansas City to three touchdowns in the final 6:13, and the Chiefs overcame a double-digit deficit for the third postseason game in a row to beat the San Francisco 49ers 31-20 Sunday in the Super Bowl.

The Chiefs (15-4) were playing in the championship game for the first time since 1970, when they won their only previous NFL title. Coach Andy Reid earned his 222nd career victory, and his first in a Super Bowl.

The Chiefs trailed 20-10 and faced a third and 15 when Mahomes threw deep to a wide open Tyreek Hill for 44 yards. Kansas City scored a touchdown four plays later, and quickly forced a punt.

Mahomes then hit Sammy Watkins for 38 yards to set up a 5-yard scoring reception by Damien Williams that put Kansas City ahead 24-20 with 2:44 to go.

The 49ers reached midfield, but Jimmy Garoppolo was sacked by Frank Clark on fourth down. Williams’ 38-yard touchdown run was icing on the cake for Kansas City.

The 49ers (15-4) fell short in their bid for a record-tying sixth Super Bowl title, even though they dominated for 3 1/2 quarters. Garoppolo threw for 219 yards and kept the Chiefs’ defense guessing by completing passes to eight receivers.