Peyton Manning shakes hands with Tom Brady after his Broncos beat the Patriots in the AFC championship game, 20-18. (Ezra Shaw/Getty Images)

Peyton Manning isn’t quite finished. He wasn’t derailed yet again by Tom Brady and the New England Patriots. He had his defense to thank for that.

In a season in which Manning at times looked done, he is back in the Super Bowl. He prevailed here Sunday in his 17th career quarterbacking duel with Brady, aided greatly by an often-overpowering, resilient-when-needed Denver defense that carried the Broncos to a 20-18 triumph over the Patriots in the AFC title game.

A tense game was not decided until the Patriots failed on an attempt for a tying two-point conversion in the final seconds, sending Manning to Santa Clara, Calif., to seek his second career Super Bowl victory. The Broncos will face the Carolina Panthers on Feb. 7.

“There’s no question this is a sweet day,” Manning said. “This was a sweet victory. To me, this victory sort of is a great example of what this entire season has been like. It hasn’t been easy. There’s been a lot of different people stepping up doing their parts at different times. . . . It’s been a unique season. There’s no question about it, and this game today was a unique football game. Everybody did their part. It truly was a team win.”

Manning had a modest 176 passing yards. He threw two touchdown passes, both to tight end Owen Daniels in the first half. The Broncos’ pass rush took it from there. It tormented Brady into a 27-for-56, 310-yard passing day. Brady threw two interceptions, both in the first half, and was sacked four times.

Denver linebacker Von Miller sacks Tom Brady in the second half. (Mark J. Rebilas/USA Today Sports)

Linebacker Von Miller led the way for Denver with 2 1/2 sacks and an interception. He was credited with four of the Broncos’ 20 hits on Brady. Fellow linebacker DeMarcus Ware hit Brady seven times and had half a sack.

“Unbelievable,” Broncos cornerback Aqib Talib said of the pass rush. “We can’t ask for nothing more than that.”

The Patriots were denied in their bid to make a seventh Super Bowl appearance with Brady and Coach Bill Belichick. They were thwarted on a pair of fourth-down attempts deep in Broncos territory late in the game.

Brady threw a four-yard, fourth-down touchdown pass to tight end Rob Gronkowski with 12 seconds remaining. But his two-point conversion pass was tipped and then intercepted by cornerback Bradley Roby . The Broncos recovered an onside kick and ran out the clock with one kneel-down by Manning.

The Patriots’ earlier touchdown came on a first-quarter run by tailback Steven Jackson, but kicker Stephen Gostkowski missed the extra point.

“We were happy we were still in the game the way we were playing offensively,” Brady said.

Brady lost for the seventh time in nine career games in Denver. His career record against Manning dropped to 11-6.

The Broncos, aided by a questionable pass-interference penalty called on the Patriots, went straight down the field for a touchdown on their opening drive. Manning made an on-target throw to Daniels, who’d gotten open running straight up the seam in the middle of the New England secondary, for the final 21 yards. Manning began the day with only one touchdown pass in Denver this season.

The Patriots took advantage of a clever instant-replay challenge by Belichick to get on the scoreboard later in the opening quarter. Manning misfired on a swing pass to his left in the direction of running back Ronnie Hillman. Linebacker Jonathan Freeny picked up the loose football for the Patriots, but the officials made an on-field ruling of an incomplete pass. Belichick threw his red challenge flag, contending that Manning’s throw was backward. He was right, and the Patriots were awarded possession at the Denver 22-yard line on a fumble recovery.

They cashed in on a one-yard touchdown run by Jackson. But Gostkowski, usually supremely reliable, sent the extra point wide right. He had connected on 523 straight extra points before that.

Brady’s first interception came on a pass thrown directly to Miller. The Broncos converted that into the second Manning-to-Daniels touchdown, a 12-yard lob to the back right corner of the end zone.

Two field goals by each team left the Patriots trailing by 20-12 in the fourth quarter. Belichick left his offense on the field on fourth and one from the Denver 16 with about six minutes to play rather than allowing Gostkowski to kick a field goal that likely would have gotten the Patriots to within five points. Brady was rushed and lobbed a short pass to wide receiver Julian Edelman, who was tackled shy of a first down by cornerback Chris Harris.

The Patriots got the ball back and moved into position for a fourth-and-six play from the Denver 14. Brady, again under pressure, lofted a throw toward Gronkowski in the back of the end zone. Gronkowski was tripled-teamed and the pass was knocked away, giving the Broncos possession of the ball with a little more than two minutes to go.

New England had yet another chance when Brady teamed with Gronkowski for a 40-yard completion on a fourth-and-10 play from midfield. That gave the Patriots a first down at the Denver 10, setting up the fourth-down touchdown to Gronkowski and the two-point drama.

“We’ve been in these situations all season, all year,” said Harris, who was pressed into duty at safety during the game. “We’re used to it now. It’s not out of the ordinary to be in a tough situation like that, the game on the line for us on fourth down. So we thrive in those situations. That’s when we like to make our plays. . . . When you play against Gronk and Brady, it’s never over with those guys.”