Packers quarterback Aaron Rodgers paced nervously on the sideline with a towel draped around his neck before San Diego ran its final play.
Chargers counterpart Philip Rivers had been so good all night long. Green Bay's defense needed one last stop on fourth-and-goal at the 3 with 15 seconds left.
Rookie cornerback Damarious Randall provided the big play, poking away Rivers' pass to Danny Woodhead near the front right pylon in the final seconds to preserve a 27-20 victory on Sunday.
The Packers (6-0) will remain unbeaten headed into their bye week.
"We'll take 'em any way we can," Rodgers said.
Rivers set franchise marks with career highs of 43 completions, 65 attempts and 503 yards passing. He threw for two touchdowns for the Chargers (2-4). His 43 completions were the most in NFL history in a loss.
But the Chargers still lost again in the final seconds. San Diego fell to Pittsburgh on the last play on Monday night.
"Brutal loss, obviously, losing the way we did," coach Mike McCoy said.
The Packers started strong and finished barely in front. Running back James Starks had touchdowns on a 65-yard run and a 5-yard pass in the first quarter.
Green Bay went up for good after Rodgers found James Jones for an 8-yard pass in the corner of the end zone for a 24-17 lead with 40 seconds left in the third quarter.
The defense allowed Josh Lambo's 32-yard field goal with 11:14 left.
But the Packers came up with their most important stop at the end.
Rodgers was 16 of 29 for 255 and two touchdowns, fairly pedestrian numbers by the Packers' high standards. The injury-riddled offense will appreciate a week of rest.
"At this point, we don't need to win pretty every week. We'd like to and we're going to get graded to that standard. You set the bar pretty high with the pretty wins," Rodgers said.
Some other notes and takeaways from Sunday's game:
RIVERS' END: On his back after being knocked down on the fourth-down play by linebacker Julius Peppers, Rivers arched his neck up, then went back down in frustration and flailed his arms.
A milestone day for the San Diego quarterback ended in frustration. And defeat.
"Heck of a finish, really. What an atmosphere, what a game. Sure, they're more memorable if you win them, but there's no apologizing from this locker room as far as our effort," Rivers said.
ROOKIE REMEMBERS: Randall had a feeling that Rivers' final pass might be headed his way. As the fourth-down play developed, the first-round draft pick remembered that San Diego ran the same play on second down, but tried to get the ball to tight end Antonio Gates.
This time, linebacker Clay Matthews covered Gates inside. Woodhead broke outside, with Randall trailing from behind.
"I was acting like I really wasn't seeing him, but honestly, I was just trying to bait him a little bit," Randall said.
ON THEIR HEELS: The Packers' defense had it most porous outing of the season.
We just didn't win the one-on-one matchups today," safety Micah Hyde said. "Thank God for our red zone defense."
The stout pass rush finally caught up to Rivers in the second half. Datone Jones sacked Rivers on third-and-7 from the Packers 40 to end one drive.
Until then, a Chargers line missing three starters held up well, with Rivers orchestrating a quick-strike offense and finding holes in the secondary.
UNHAPPY RETURNS: Rookie running back Melvin Gordon was benched in the second half after two fumbles. He finished with seven carries for 29 yards in a disappointing return to the state where he set records in college with the Wisconsin Badgers.
"He put it on the ground twice, and we've got to put a stop to that," McCoy said.
INJURY REPORT: Gordon said he was fine after leaving briefly in the first half to be checked out for an ankle injury. Safety Eric Weddle left in the second half with an unspecified injury. The Packers took another hit to their receiving corps when rookie Ty Montgomery was carted to the locker room with a left ankle injury in the second quarter. Green Bay lost Jordy Nelson (right ACL) in the preseason. Randall Cobb (shoulder) and James Jones (hamstring) are also dealing with nagging injuries.