SACRAMENTO, Calif. (AP)Asher O’Hara threw a 51-yard touchdown pass to Pierre Williams to cap the scoring with 6:28 to play and No. 2 seed Sacramento State beat Richmond 38-31 Saturday in the second round of the FCS playoffs.

Sacramento State (12-0), ranked No. 2 in the FCS coaches poll, extended its program record for single-season wins. The Hornets play No. 7-seed Incarnate Word in the quarterfinals.

Leroy Henley caught a 21-yard touchdown pass from Reece Udinski to give the Spiders a 31-24 lead going into the fourth quarter but Jake Dunniway hit Marshel Martin for a 19-yard TD and, after Richmond missed a 46-yard field-goal attempt, Williams slipped behind a pair of defenders and was hit in stride by O’Hara’s pass for the winning touchdown catch-and-run.

Williams finished with four receptions for 107 yards and Martin caught 10 passes for 148 yards and two touchdowns for Sacramento State. The duo is the first to each have at least 100 yards receiving in the same game for the Hornets since the 2019 season.

O’Hara threw a 5-yard TD pass to Martin that opened the scoring midway through the first quarter but Reece Udinski sandwiched touchdown passes of 25 yards to Jasiah Williams and 24 yards to Henley around a 1-yard scoring run by Savon Smith to give Richmond (9-4) a 21-7 lead early in the second quarter.

Elijah Tau-Tolliver returned the second-half kickoff 95 yards for a touchdown that gave the Hornets a 24-21 lead.

Udinski finished 21-of-39 passing for 216 yards and three touchdowns for Richmond. Aaron Dykes added 109 yards rushing on 20 carries.

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/ap-top25. Sign up for the AP’s college football newsletter: https://tinyurl.com/mrxhe6f2