GREEN BAY, Wis. — Under pressure in subzero weather, Colin Kaepernick kept his cool.
Facing a blitz on third and 8, the elusive San Francisco 49ers quarterback scrambled 11 yards out of trouble to set up Phil Dawson’s 33-yard field goal as time expired for a 23-20 win Sunday over the Green Bay Packers in an NFC wild-card game.
It doesn’t matter where or when — the 49ers keep figuring out how to beat Green Bay.
‘‘Didn’t think we were going to pull it out, did you?’’ coach Jim Harbaugh said.
When it’s Kaepernick and the 49ers facing the Packers, the game is never over. Even in the meat locker that was Lambeau Field, where the temperature at kickoff was 5 degrees, with a wind chill of minus-10, making it the seventh-coldest game at Lambeau since 1959, and the fourth-coldest postseason game at the stadium.
No sweat for Kaepernick. He went sleeveless, and didn’t wear gloves.
‘‘I’ve played in cold-weather games before,’’ he said. ‘‘I feel like it’s more mental than anything.’’
San Francisco plays at the Carolina Panthers next Sunday in the divisional round.
Kaepernick threw for 227 yards, including a 28-yard TD pass to Vernon Davis, and ran for 98, while Michael Crabtree had eight catches for 125 yards for San Francisco.
In a back-and-forth fourth quarter, the 49ers (13-4) threw the final punch. Kaepernick escaped a blitz to get to the 27 with 1:13 left.
‘‘Just trying to figure out a way to get that first down,’’ Kaepernick said. ‘‘Had a play called, we didn’t get the look that we wanted. It worked out for us.’’
Dawson nailed the winning kick five plays later — but only after it was nearly blocked by edge rusher Davon House. He was whistled for offsides on the play, but the 49ers declined the penalty with the win in hand.
Mason Crosby’s 24-yard field goal tied it at 20 for the Packers (8-8-1) with 5:06 left before the 49ers’ final drive.
Until then, Packers quarterback Aaron Rodgers did his best to turn into ‘‘Captain Comeback’’ again. After a slow first quarter, Rodgers finished 17 of 26 for 177 yards and touchdown.
‘‘Very disappointing, personally,’’ Rodgers said. ‘‘It’s frustrating not to play your best game in tough conditions. Defense holds them to 23 points. We should win that game.’’
Kaepernick connected with a spinning Davis down the seam for a score with 10:39 left that put the 49ers up, 20-17. The TD quickly answered John Kuhn’s 1-yard run that had briefly given the Packers a 4-point lead.
Kuhn’s touchdown was set up after Rodgers, in the clutches of a 49ers defender, somehow managed to escape a sack on fourth and 2 and found Randall Cobb for a 26-yard gain to the Niners 4.
Eddie Lacy ran for 81 yards on 21 carries for the Packers, while Frank Gore had 66 yards and a touchdown on 20 carries for the 49ers.
But it was Kaepernick who was the difference-maker once again in San Francisco’s fourth straight win over Green Bay. He finished 16 of 30 with the touchdown and an interception.
For the second year in a row, the Packers’ season has started and ended with losses to the 49ers. The latest edition of what’s turned into a chippy and heated rivalry took place on the worn, frozen turf of Lambeau Field.
An injury-filled season for the Packers came to an end.
A depleted Green Bay defense — already playing without linebacker Clay Matthews — lost two more starters Sunday in cornerback Sam Shields and linebacker Mike Neal — but still managed to hold its own against the Niners.
‘‘I’m just very proud of this team as far as their ability to continue to overcome adversity,’’ coach Mike McCarthy said. ‘‘It hit us at every turn, it hit us again today, and these guys just keep fighting and fighting.’’
In a memorable playoff debut last January, Kaepernick ran for a quarterback playoff-record 181 yards and a pair of touchdowns. In the season opener in September, the strong-armed quarterback threw for a career-best 412 yards and three scores.
This time, he did his damage against the Packers on the ground and through the air.
Kaepernick tore through the Green Bay defense for a 42-yard run, getting a break at one point after House whiffed on a tackle, to set up Gore’s 10-yard touchdown run that helped give the 49ers a 13-10 halftime lead.
‘‘It was unbelievable, the way he was getting the edge. I mean, just clutch,’’ Harbaugh said.
‘‘Colin Kaepernick, I think we can all agree, is a clutch performer.’’