Christian McCaffrey got revenge against the Carolina Panthers, leading the San Francisco 49ers to a 20-9 win against his former team.

The NFC battle was a sloppy game on both sides, but McCaffrey was a steady force all night.

San Francisco’s defense was stout. They allowed just nine points and 12 first downs.

Monday’s victory keeps the 49ers (8-4) within striking distance of the NFC West-leading Los Angeles Rams (9-2) and Seattle Seahawks (8-3), who are second in the division.

The Panthers (6-6) are a half game behind the Tampa Bay Buccaneers (6-5) in the NFC South.