Carolina’s Luke Kuechly blocks New England’s Rob Gronkowski (87) on the final play during the Monday’s game in Charlotte, N.C.

CHARLOTTE, N.C. — Cam Newton threw a 25-yard touchdown pass to Ted Ginn Jr. with 59 seconds left and the Carolina Panthers held off the New England Patriots 24-20 Monday night for their sixth straight victory when officials picked up a penalty flag on the final play.

Stephen Gostkowski’s 26-yard field goal put the Patriots up 20-17 before Newton drove Carolina 83 yards on 13 plays for the go-ahead touchdown. The speedy Ginn escaped Kyle Arrington along the left sideline and outraced Logan Ryan to the left pylon for his third touchdown of the season.

The Pats appeared on the verge of making an improbable comeback when Brady moved New England to the Carolina 18 and fired into the end zone on the game’s final play. The pass was intercepted by safety Robert Lester, but officials threw a flag after it appeared linebacker Luke Kuechly had interfered with tight end Rob Gronkowski by grabbing him with both hands. But officials quickly gathered together and waved off the flag.

An angry Brady sprinted over to two officials to argue the call as they walked off the field. Meanwhile, the Panthers celebrated.

“We had good pressure and our safety Robert Lester was in good position to make the play,” Panthers coach Ron Rivera said.

Brady was 29 of 40 for 296 yards and one touchdown.

Newton completed 19 of 28 passes for 209 yards and three touchdowns. He also ran seven times for 62 yards in what will go down as one of his best games a pro.

After the game, Rivera called it a “gutsy effort.”

“It wasn’t our best defensive effort, but it was one of our better offensive efforts,” Rivera said. “It was good for our guys to win a game like this.”

Carolina’s win came eight days after a 10-9 victory over reigning NFC champion San Francisco.

The Panthers entered the fourth quarter with a 17-10 lead, but Stevan Ridley made up for an earlier fumble with a 1-yard touchdown run and the Patriots took the lead with 6:32 left in the game when Gostkowski slipped a 26-yard field goal just inside the left upright.

Newton gave Carolina a 17-10 lead in the third quarter on an 81-yard touchdown drive that took more than 8 minutes off the clock and featured a scramble in which the third-year quarterback avoided four tacklers and turned a potential 20-yard sack into a 14-yard gain and a first down.

Newton completed all seven passes on the drive for 77 yards finding Greg Olsen at the right pylon with 2:10 left for his second touchdown pass, putting the Panthers back in front.

“Cam did the things he needed to do to put us in position to win the football game,” Rivera said. “It has a lot to do with his maturity that we have talked about.”