Packers linebacker Clay Matthews got his hits on Colin Kaepernick.

But the 49ers quarterback punched back. Repeatedly.

In a season-opening 34-28 win over the Packers on Sunday at Candlestick Park Kaepernick threw for 412 yards and three touchdowns while rarely using his legs. With the Packers determined to stop his scrambling and read-options run Kaepernick had 22 rushing yards 159 fewer than he had in last season’s divisional-playoff win over Green Bay.

With the 49ers trailing 28-24 with 8:26 left Kaepernick led a game-winning 80-yard drive highlighted by a 43-yard completion to wide receiver Anquan Boldin who had 13 catches 208 yards and a touchdown after he was acquired from the Ravens for a sixth-round pick March. The game-winning drive was capped by a one-yard run by Frank Gore to give the 49ers a 31-28 lead with just under six minutes left.

Kaepernick’s scintillating performance was part of a memorable quarterback duel. Green Bay’s Aaron Rodgers the 2011 MVP launched his 2013 candidacy with 333 yards and three touchdowns. With Green Bay trailing 24-21 he directed a 76-yard drive capped by a two-yard run by Eddie Lacy midway through the final quarter.

Meanwhile Matthews whose quotes regarding read-option quarterbacks got the 49ers’ attention earlier in the week had a sack and a controversial hit on Kaepernick.