DETROIT (AP) – Jared Goff threw for 330 yards and three touchdowns, leading the surging Detroit Lions to a 34-23 win over the NFC North-leading Minnesota Vikings.

The Vikings needed a win or tie to clinch the division title. Kirk Cousins threw for 425 yards, inluding a franchise-record 223 to Justin Jefferson on 11 catches. But Dalvin Cook ran for just 23 yards on 15 carries, and Minnesota couldn’t stop Goff. Detroit has won five of six, its best stretch since its last postseason appearance in 2016.

The Lions invested a lot to give Goff deep-play threats this season, signing DJ Chark in free agency and trading up to draft Jameson Williams 12th overall. The moves finally paid off against Minnesota.