GREEN BAY, Wis. (AP) A pick, a beneficial penalty and a game-winning kick.

Quite a final minute for the Green Bay Packers.

Mason Crosby kicked a 27-yard field goal as time expired to cap an 81-yard drive set up by Kevin King's interception with 1:07 left, and the Packers outlasted the San Francisco 49ers for a 33-30 win on Monday night.

The final drive was extended after 49ers cornerback Richard Sherman was flagged for illegal contact on third-and-15 that wiped out a sack of Aaron Rodgers with 43 seconds left.

Rodgers rushed up the middle for a 21-yard gain on the next play. The two-time NFL MVP completed two more passes for 19 yards to set up Crosby's game-winner for Green Bay (3-2-1).

The veteran kicker was perfect a week after missing four field goals in a loss at Detroit.

''It's very appropriate, what he went through last week, (for) the team to stick with him,'' Rodgers said. ''And then he responded.''

Rodgers threw for 425 yards and two scores, both to Adams. The second came with 1:55 left from 16 yards to tie the score at 30.

C.J. Beathard passed for 245 yards and two long touchdowns to speedy receiver Marquise Goodwin for the 49ers (1-5).

For a while it looked like the 49ers might hold on for their first victory since quarterback Jimmy Garoppolo was lost for the year in Week 3 with a torn ACL.

Turnovers hurt them again - three more on Monday night, but none bigger than King's pick at the Packers 10.

''Very disappointed. We had a chance to win that game,'' coach Kyle Shanahan said. ''It hurts.''

The second-year cornerback was locked in 1-on-1 coverage with Goodwin, who had burned the secondary all night. This time, King kept up and pulled in a ball that looked slightly underthrown by Beathard.

Then Rodgers went to work, aided by the penalty on Sherman, who was covering Davante Adams.

Rodgers was 25 of 46. Adams had 10 catches for 132 yards, one of three Packers receivers to go over 100 yards.

The Packers scored 10 points in the final 2 minutes, capped by Crosby's fourth field goal of the night.

''This week was a grind, it was one of the tougher weeks of my career,'' Crosby said about bouncing back from his awful game last week.

It's just what the Packers needed going into their bye week.

The late flurry overshadowed another troubling start by the defense.

The Packers had 17-7 lead when Rodgers connected with Davante Adams for a 9-yard touchdown with 1:58 left in the first quarter.

Then San Francisco just brushed past Green Bay.

Beathard connected with Goodwin for the 67-yard score down the middle of the field on the ensuing series.

The 30-yard score came with 6:05 left in the second. Goodwin celebrated by mimicking a long jump in the end zone.

He finished with four catches for 126 yards. Beathard was 16 of 23.

San Francisco also got more pressure after the first quarter, forcing the Packers into more third-and-long situations.

Rodgers figured out the Niners in the end.

''We had every opportunity to finish and win that game and we didn't get it done,'' Shanahan said.

KEY PLAY

The 49ers looked like they were in good shape after Adams' second touchdown, starting their series at their own 47 with 1:55 left after a 32-yard return by Richie James Jr., and a 15-yard unnecessary roughness penalty on Tony Brown.

But on third-and-3 from the Packers 46, Beathard unloaded under pressure.

''It wasn't really what we wanted. The all-out blitz stuff, we had to get rid of it,'' Shanahan said. There (are) four options on the play, but that wasn't the one we wanted.''

King picked a nice time for his first career interception.

''I've just got to stay the course, keep doing your job, keep it going, and those types of plays are going to come,'' King said.

NO TAKEAWAYS

Another game without a takeaway for the Niners dropped them to an NFL-worst minus-11 in turnover differential. The defense has generated a league-low three takeaways coming into the night, which had been the fewest total for the franchise after five games since 1977.

QUOTABLE

''It doesn't matter if you agree with the call. It's not like, `Oh, I didn't agree with the call, they're going to pick it up.' They called it. I've got to find a way to do better.'' - Sherman on the illegal contact penalty.

ANTHEM

Goodwin appeared to be the only player on either team with an apparent sign of protest during the national anthem, raising a right first in the air.

UP NEXT

49ers: Host the unbeaten Los Angeles Rams on Sunday.

Packers: After a bye week, Green Bay visits the Rams on Oct. 28.

---

More AP NFL: https://apnews.com/tag/NFL and https://twitter.com/AP-NFL

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.