DETROIT (AP) — Cam Newton showed he was very focused on football, throwing three touchdowns to help the Carolina Panthers build a lead big enough to hold off the Detroit Lions for a 27-24 win Sunday.

The Panthers (4-1) scored 24 straight points after trailing the Lions 10-3 early in the second quarter. Detroit rallied, but could not stop Newton on his last drive to get the ball back.

Newton came under fire for making sexist comments to a female reporter this week. He apologized after losing an endorsement deal and getting criticized by the NFL.

He was 26 of 33 for a season-high 335 yards. On perhaps the game's key play, he converted a third-and-19 from the Carolina 24 with a sharp, 17-yard pass to Kelvin Benjamin with 2:00 left while clinging to a three-point lead against a team out of timeouts.

Newton threw a 6-yard TD pass to rookie Christian McCaffrey to pull the Panthers into a 10-10 tie early in the second quarter and a 10-yard pass to Devin Funchess for a tiebreaking score with 48 seconds left in the first half. With a perfectly lofted 31-yard pass to Benjamin, the 2015 NFL MVP put Carolina up 24-10 early in the third.

Detroit (3-2) struggled to move the ball in the air and on the ground until late in the game.

Matthew Stafford, limping after being sacked several times and hit on other plays, threw a 4-yard TD pass to Darren Fells with 5:56 left and a 20-yard pass for a score to the former professional basketball player with 3:22 to go.