The San Francisco 49ers beat the Packers 23-20 on a last-second field goal to win a fierce battle in brutally cold conditions at Lambeau Field in Green Bay, Wisconsin in their wild card round playoff game on Sunday.

Phil Dawson booted a 33-yard field goal just inside the right upright on the last play of the game to give the 49ers the victory after driving from their own 20 in the last five minutes after the Packers tied it 20-20 with a field goal of their own.

The temperature at the start of the game was a frigid five degrees Fahrenheit (-15 C) and dropped as the contest wore on as many players and on-field officials wore balaclavas for warmth.

San Francisco quarterback Colin Kaepernick rescued the Niners on three different occasions with key runs that helped set up scores for the NFC wild card team, which earned a date in next week's divisional round against the Carolina Panthers.

"Colin Kaepernick, I think we can all agree, is a clutch performer," San Francisco coach Jim Harbaugh told reporters after the bruising victory that saw several players on both teams hobble off the field with injuries.

The win was the 49ers' seventh in a row this season and fourth straight over the Packers dating back to 2012.

Twice the Packers took the lead from the 49ers, once in the second quarter and again in the fourth quarter, but both timesSan Francisco responded on their next possession with touchdown drives keyed by long runs by Kaepernick.

LONG STRIDER

The long-striding Wisconsin native dashed 42 yards to help put the Niners back in front 13-7 in the first half, and after they fell back 17-13, ripped off a 24-yard run to set up another score for a 20-17 lead.

After Green Bay tied the score 20-20 on a 24-yard field goal by Mason Crosby with 5:06 left, Kaepernick did it again.

On a third-and-eight from the Green Bay 38-yard line, just outside field goal range with 70 seconds left, Kaepernick rolled left to get away from the pass rush and gained 11 yards to keep the drive alive and move the ball into field goal range.

Running back Frank Gore did the rest, powering through the middle to move the ball closer and set up a comfortable kick for Dawson.

Kaepernick, who played sleeveless though he did wear a balaclava under his helmet, completed 16 of 30 passes for 227 yards, one touchdown and one interception. He ran the ball seven times for 98 yards.

"It's not that cold," Kaepernick told a TV interviewer on the field after the triumph. "It's all mental."

Green Bay quarterback Aaron Rodgers, after a quiet first quarter, finished up hitting 17 of 26 passes for 177 yards and a touchdown. Rookie running back Eddie Lacy ran like a battering ram, gaining 81 yards on 21 carries.

NEAR MISS

"Frustrating way to end the season," said Rodgers, who came back after missing seven games with a broken collarbone to lead the Packers into the playoffs with a last-minute win over the Bears in the regular season finale.

"Personally, very frustrating not to play your best game. Tough conditions, but defense holds them to 23 points, we should win that game."

Packers coach Mike McCarthy lamented his team's near miss.

"We were one play away," he said. "One play not good enough."

San Francisco dominated the first quarter, outgaining the Packers 118 yards to six, but Green Bay's defense kept the visitors out of the end zone and the Niners kicked a pair of field goals for a 6-0 lead.

Green Bay and quarterback Rodgers came alive in the second quarter, and the Packers took a 7-6 lead before San Francisco responded with Gore's 10-yard touchdown run that helped them carry a 13-10 lead into the intermission.

After a scoreless third quarter, the offenses heated up.

The Packers broke through with a big play when they went for a fourth-and-two from the 49er 30-yard line.

Rodgers dropped back and looked about to be sacked before pulling away and rolling right to find receiver Randall Cobbfor a 26-yard gain, setting fullback John Kuhn up for a one-yard TD plunge for a 17-13 lead.

A 28-yard strike from Kaepernick to tight end Vernon Davis put the Niners back in front 20-17 before Green Bay's field goal tied it after San Francisco's defense held from a first and goal from the nine.

Michael Crabtree was the workhorse receiver for the 49ers, catching eight passes for 125 yards. Jordy Nelson paced the Packers with seven receptions for 87 yards and a touchdown.