“It’s being able to perform well when everything’s not right for you, whatever those circumstances are,” coach Bill Belichick said a few days before the Patriots’ 34-20 win over Buffalo Sunday. “There have been a lot of situations this year where things aren’t the way we would hope they would be, but you have to go out and play through them.”

Get Sports Headlines in your inbox:

The Globe's most recent sports headlines delivered to your inbox every morning.

On the personnel front, they lost Wes Welker to free agency, Aaron Hernandez to a murder charge, and opened the season without their top five pass-catchers from last year.

Injury-wise, they lost the heart and soul of the defense in Week 4 when Vince Wilfork went down with a season-ending Achilles’ injury, and lost their other defensive captain in Week 6 when linebacker Jerod Mayo tore his pectoral muscle. They played their first six games, and final three, without star tight end Rob Gronkowski. Right tackle Sebastian Vollmer broke his leg in Week 8, Shane Vereen missed nine games with a fractured wrist, Tommy Kelly suffered a season-ending knee injury in Week 5, and each starting member of the secondary missed at least one game.

In game situations, they were the Cardiac Kids all season. The Patriots overcame a 24-point halftime deficit to Denver. They kicked two 53-yard field goals in the fourth quarter to help erase a 10-point halftime deficit to Houston. They went the length of the field and scored the game-winning touchdown with five seconds left against the Saints, overcame a 17-3 halftime deficit to Miami, and came back to beat the Browns by a point after trailing by 12 inside the two-minute warning.

They were tough in the elements, as well. The huge comeback against Denver came in 6-degree weather. They almost pulled off a miracle comeback in torrential downpours in Cincinnati, then easily handled the Bills Sunday on a day when so much rain fell, the Gillette Stadium turf looked like one giant Slip ’n Slide.

“It doesn’t get much tougher than that,” said kicker Stephen Gostkowski, who was 4 for 4 on field goals and had six touchbacks on seven kickoffs. “I don’t think I’ve ever been a part of something that sloppy. But when it’s like that, you’ve just got to increase your focus . . . slow things down a bit and just make sure that everything goes smoothly.”

And here they stand, with a 12-4 record, the No. 2 seed in the playoffs, and a first-round bye. They did it with five rookies and three second-year players in the starting lineup Sunday. They did it with unheralded rookies at defensive tackle, a former third-string receiver catching 105 passes, and a running back whom not even the lowly Tampa Bay Buccaneers wanted.

It would’ve been easy to pack it up against Denver and Houston and Cleveland and Buffalo. The Patriots fought through their obstacles and came back to win each time. Even when they didn’t win — against Carolina, Miami, the Jets, and Cincinnati — they literally fought to the final second and came up just short.

“I almost think it’s a good thing that we’re a young team, because sometimes these guys don’t know any better, but they keep on playing and keep fighting,” special teams captain Matthew Slater said. “Who knows? Maybe if we were an older team it would be, ‘Oh man, I’ve been in this situation before, and it hasn’t gone that well.’ ”

The Patriots’ season defies all logic, even with a heck of a quarterback, a pretty darn good coach, and 53 players with impressive mental toughness.

“I think football is 90 percent mental, 10 percent physical. It really is,” said second tight end Matthew Mulligan, signed off the street in September to play special teams but forced into significant action during Gronkowski’s absences. “We never felt sorry for ourselves. We stepped up to the challenge, and I think that’s a testament to our team chemistry and our leadership.”

“It’s been an incredible experience, one I think I’ll cherish for a long time. It starts at the top obviously with Coach Belichick, and guys just never wavered. It’s an amazing team chemistry, and I’m just thankful to be part of it.”

Mental toughness just doesn’t happen by accident, of course. The rain began a couple of hours before kickoff Sunday, and hadn’t let up more than an hour after the final whistle. Belichick loves to practice “situational football,” and yes, he had put his team through that situation before.

“Even starting back in [organized team activities] when we got torrential downpours, some teams would take it indoors,” cornerback Kyle Arrington said. “But we practice in that kind of weather because you never know, and today was one of those days.”

“You complain and gripe when it’s 35 degrees outside and it’s raining or snowing or really windy,” Gostkowski added. “It pays off, though. The coaches know what they’re doing when they put us out there for games like this.”

Of course, the Patriots also have showed impressive toughness in the traditional sense. Aqib Talib (hip), Arrington (groin), Alfonzo Dennard (knee), and Brandon Spikes (knee) have played through injuries most of the season. Logan Mankins needed two medical personnel to help him limp off the field Sunday with an ankle injury, but he returned a series later and finished out the game.

“There’s nobody tougher than Logan Mankins,” quarterback Tom Brady said. “So you know when he’s getting helped up, you know he’s not feeling good. But he fought through it. There’s nobody that I’ve ever played with that is as tough as him.”

It has been a taxing season for the Patriots, both mentally and physically. Their reward for displaying remarkable toughness for 17 straight weeks? A week of rest — mercifully.

“A bye will definitely help all of us with our bodies,” Mulligan said. “You need to get some guys some rest, get healthy, and be able to game plan for a team for two weeks.”

Will the Patriots be able to heal their nicks and bruises in two weeks? Can the rookies, who have never played a 16-game season, be able to keep it going in January? Will they have to play their next game in a New England snowstorm?

The Patriots don’t know, and frankly don’t care.

“Everybody has to deal with something,” Belichick said. “We’ll have everybody ready to go, and whoever is called on, if we put them out there, we have confidence in them.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.