Kaepernick said he ‘‘will never forget’’ that he was selected in the second round of the 2011 NFL draft, 35 spots behind Newton, the Heisman Trophy winner and the top pick that season.

On Sunday, Kaepernick outplayed his quarterback counterpart, throwing one touchdown pass and running for another score as the San Francisco 49ers defeated the Carolina Panthers, 23-10, to advance to the NFC title game for the third straight season.

Kaepernick completed 15 of 28 passes for 196 yards, avenging his worst statistical performance of the season two months ago against the Panthers.

‘‘That’s not the first, nor will it be the last time somebody does that,’’ Newton said of Kaepernick’s copycat display before leaving the postgame podium.

Anquan Boldin had eight catches for 136 yards and Frank Gore ran for 84 yards on 17 carries for the 49ers (14-4), who will visit Seattle next Sunday looking for a return trip to the Super Bowl.

‘‘I think we’re the two teams that everybody was looking at from the beginning,’’ Kaepernick said. ‘‘It’s going to be a knockdown, drag-out game.’’

The 49ers will have their hands full.

San Francisco split two games with the Seahawks this season, losing, 29-3, at CenturyLink Field in September.

The 49ers were missing receiver Michael Crabtree in that lopsided loss. Crabtree had only three catches for 26 yards Sunday, but Boldin said Crabtree drew plenty of double teams that allowed him to get open.

‘‘That’s the great thing about our team — we have weapons all around,’’ Boldin said. ‘‘You try to take one guy out and you still have two or three guys left who can make big plays.’’

The 49ers held Newton in check, intercepting him twice and sacking him five times while stopping the Panthers (12-5) twice on the 1-yard line in the first half.

Newton finished with 267 yards passing and had 54 yards on 10 carries, but the Panthers only found the end zone once — on a 31-yard strike to Steve Smith.

It was a rough playoff debut for Newton.

Linebacker Ahmad Brooks stopped Newton on a fourth-down sneak early in the second. Later, Brooks vaulted over the line and past Newton — he was called for offsides, but the 49ers showed the Panthers it wouldn’t be easy.

‘‘Terrible ending to a great season,’’ Newton said.

Almost fittingly, he misfired into the end zone on the final play of the game.

Kaepernick was held to 91 yards passing and 16 yards rushing, and sacked six times in the first meeting with Carolina, a 10-9 loss at Candlestick Park.

But he played efficient football Sunday.

‘‘We had to get settled down,’’ Kaepernick said. ‘‘We came out, they did some unorthodox things against us. We settled down, we got into our rhythm, we started making plays.’’

San Francisco led, 13-10, at the half before Kaepernick scored midway through in the third quarter on a 4-yard run off a read option.

The Panthers couldn’t answer, failing to score in the second half.

The 49ers took the lead into the locker room after Vernon Davis caught a 1-yard touchdown pass in the back of the end zone from Kaepernick with five seconds left in the first half.

Davis was initially ruled out of the end zone on a play where 49ers coach Jim Harbaugh raced on to the field, drawing a 15-yard penalty for unsportsmanlike conduct. Harbaugh said he wasn’t disputing the catch, but rather that the play clock continued to run after the play.

All turned out fine for the 49ers, though, as officials overturned the call, ruling Davis dragged his left foot and scored.

Television replays showed the 49ers had 12 men in the huddle with backup tight end Vance McDonald racing to the sideline before the ball was snapped. Referee Carl Cheffers defended the call, telling a pool reporter the ball hadn’t been spotted — although Fox television replays seem to indicate otherwise.

Carolina spotted San Francisco a 6-0 lead with two defensive penalties — an unnecessary roughness on safety Mike Mitchell and a headbutt on cornerback Captain Munnerlyn — leading to field goals.