DENVER — If this was the last time we’ll see Tom Brady play against Peyton Manning, then we got one to remember.

In a game that went down to the final 12 seconds, Manning’s Denver Broncos held on to beat Brady and the New England Patriots, 20-18, in the AFC championship game Sunday. The loss ended the Patriots’ season and, more importantly, their quest for consecutive Super Bowl championships.

This wasn’t vintage Manning or Brady by any means. Both struggled at times. But that in itself lent to the drama.

Coming into the game, Manning was, at 39, the aging warrior. Once he was the very best at his position, but, beset by injuries, he had the worst regular season of his career.

Manning may not possess the physical skills of his youth, but his football sense remains impeccable. On Sunday he only threw for 176 yards, completing just 17 passes in 32 attempts. Yet he made clutch passes when needed. He threw two first-half touchdowns to tight end Owen Daniels, each time finding the mismatch of linebacker Jamie Collins trying to cover Daniels.

“I don’t know who said he didn’t have it anymore. I didn’t,” said Malcolm Butler, the Patriots up-and-coming cornerback. “That’s a future Hall of Famer. I never doubted him.”

And then there was Brady. His offensive line collapsing all around him in the face of a relentless pass rush, Brady spent most of the day retreating.

He threw two interceptions, was sacked four times and hit another 20. Read that again: hit another 20 times.

“It’s football,” said Brady. “I think there were a lot of plays I got hit pretty hard today, so it’s just football.”

Yet there he was at the end, looking to lead the Patriots back to another improbable victory as he has so often done.

Trailing by eight – Stephen Gostkowski inexplicably missed the kick after New England’s first touchdown – the Patriots got the ball back at midfield with 1:52 remaining in the fourth quarter.

Four plays later, with Brady getting knocked down on each of the previous three, the Patriots faced a fourth-and-10. Brady lofted a long pass down the right seam to tight end Rob Gronkowski, who was covered by two defenders. Gronkowski caught the ball at the 10.

The 77,112 fans in Sports Authority Field at Mile High gasped, as did a national television audience. The Patriots weren’t dead yet.

On second down, Brady completed a 6-yard pass to Julian Edelman, then missed connecting on third down. That brought up fourth-and-goal from the 4-yard line with 17 seconds left, the season on the line.

Brady took the shotgun snap, surveyed the field and again threw a pass toward Gronkowski in the back of the end zone. Gronkowski leaped and reached around Denver defensive back Chris Harris Jr. to somehow snare the ball out of midair.

Another gasp. Another sign of life for New England.

So it came down to a two-point conversion. In the face of another heavy pass rush, Brady threw to Edelman at the goal line. Aqib Talib, the former Patriot, tipped the ball into the air, where Bradley Roby intercepted it.

Season over.

After the game, Brady and Manning met at midfield. Perhaps a final time? We’ll see.

For now, it is Manning moving on to his fourth Super Bowl. And fittingly, Brady and the Patriots didn’t go out without a fight.

This was a trying season, going back to last year’s AFC championship game, won by the Patriots – and quickly muddled by the Deflategate scandal.

That was just the first of many obstacles the Patriots had to overcome. And while it may be difficult to appreciate what they accomplished after losing such a gut-wrenching game, they know how tough it is to get to this juncture.

“It’s been a tremendous year,” said Matthew Slater, New England’s special teams captain. “We were under so much scrutiny all off-season. People didn’t have a lot of great things to say about us, so we took that personally. And it was our goal to come out here and win as many games as we could and achieve the ultimate goal, just like any other team in this league.”

Was it harder than any other year?

“They’re all hard,” said Slater. “We know how a lot of people feel about us. It’s very hard to play in this league. It’s very hard to have success. … At the end of the day we felt we did enough to get us into this position. We just didn’t do enough to get it done.”