SANTA CLARA, Calif. — Just under six minutes remained in the third quarter as the 49ers offense, backed up at the 9-yard line, set up for its seventh drive of the game. The 49ers had yet to score a touchdown on this Dallas defense. That reality was underlined when the Cowboys, despite getting a 46-yard bomb to receiver CeeDee Lamb, opted to punt on fourth-and-5 in 49ers territory. The score was still tied at 9. The energy was percolating in Levi’s Stadium. Everyone knew that whatever was about to happen, it would be critical to the outcome. A spot in the NFC Championship Game was on the line.

And the 49ers huddle was animated.

Left guard Aaron Banks was lit, yelling, “One play at a time! We gotta get to pay dirt! Let’s go!”

“I ain’t never heard Banks talk that much,” right guard Spencer Burford said.

Deebo Samuel pulled everyone together to rally the troops, making sure everyone understood it was time to turn up. “Whatever it takes,” he implored them. “We’ve got to go do it right now.” Fullback Kyle Juszczyk joined in the hype. They all were barking, as the TV timeout gave them an opportunity to feel the urgency brewing. There was an excitement permeating that 49ers huddle. More than that, a joy for the moment. As if they like how the weight of the pressure feels on their backs. As if they savor the increased intensity. They hadn’t been anything close to the machine steamrolling defenses for an average of 34.6 points over their last seven games, including 41 in last week’s wild-card round. But not being at their best required them to show up in the clutch.

“We can all look each other in the eyes,” Juszczyk said, “and be like, ‘Now is the time!’ You get so much confidence from the other guys because you can see it in their eyes. They understand the moment.”

Sunday, that included Brock Purdy’s eyes. As each player surveyed their teammates in the huddle, a huddle featuring legends in the making, they found nothing different in their quarterback’s eyes. Even though things didn’t go smoothly Sunday, even though the Dallas defense presented a unique challenge for the rookie, Purdy’s eyes were the same eyes they’ve seen. Eyes like theirs.

“That is crazy when you think about it,” Juszczyk said.

And together, with No. 13 leading them, they marched 91 yards for the go-ahead touchdown that would eventually spell the end of the Cowboys’ season. The 49ers won 19-12 and advanced to face Philadelphia because for these 10 plays, and six minutes, their offense finally took it to Dallas, racking up at least 5 yards on each of the first six plays. The drive wasn’t without struggle. They benefited from two Cowboys penalties and a dropped interception by Trevon Diggs on a tipped Purdy pass. But that was the million-dollar question of this divisional-round matchup. How would Purdy handle an elite defense? How would he fare when being stalked by inevitable postseason adversity?

The 49ers learned Purdy’s celebrated poise could handle the difficulty of playoff football.

“Confident. The whole time. It was awesome,” George Kittle said. “I thought Brock did really well, especially when our offense wasn’t doing well early. … Brock wasn’t getting distraught. There was no, like, jitteriness to him. He was just Brock Purdy. Walking in the huddle, calling the play and delivering.”

The 49ers offense huddles during the first half of the game Sunday against the Dallas Cowboys. (Lachlan Cunningham / Getty Images)

He will need to do so again if the 49ers are to advance to the Super Bowl. The best team in the NFC will be hosting. The weather may be frigid. The foe will be elite. The stakes even greater. But after Sunday, the 49ers can feel much better about Purdy’s ability to handle such odds. Because against Dallas, he survived despite not putting up the fantastical performance he did against lesser opponents. He’d thrown at least two touchdowns in all seven of his previous games (and three in each of the last two). But this one was tougher. The speed of Dallas’ defense presented a different problem.

The 49ers were committed to running the ball, attacking the weakness of the Cowboys defense. But Dallas seemed ready for that, stacking the box and taking away the 49ers run game. Then, in obvious passing downs, the Cowboys did what they do best — rush the passer. Purdy has been sacked and under pressure before. But his scrambling was largely negated by the Cowboys pass rush and pursuit. He couldn’t spin away and buy more time to make a play because Dallas’ front seven is so fast. He wasn’t getting the ball out fast enough and several times wound up running for his life.

Like on third-and-goal from the 8 in the first quarter, when he scrambled to his left but was beat to the edge by Cowboys Micah Parsons and Osa Odighizuwa, with DeMarcus Lawrence charging hard. Purdy had to run back toward the 20-yard line just to get in position to throw it away.

“Oh, dear. That was stressful wasn’t it?” Kittle said. “Because I was blocking on that play and I turned around like, ‘Why do you still have the ball?’ … Just so stressful. Rookies, man. Rookies.”

His holding onto the ball almost cost them three points in the first half when he burned six seconds before throwing the ball away. In another stadium, the clock might not have stopped when it did, leaving the 49ers one second for a Robbie Gould field goal. Shanahan had to cover his mouth with his play sheet for what he had to say to his quarterback as Purdy walked back to the sidelines.

“Just wanted him to throw it away a hair earlier,” Shanahan said.

But the shining element of Purdy’s performance — his first game with no touchdown passes since taking over for Jimmy Garoppolo — was how he didn’t let the hardships get to him. He didn’t let his perfectionism focus on what was going wrong. He didn’t let the mounting pressure take away his free spirit. He didn’t let a worthy foe produce any visible doubt.

No better picture of a player’s fortitude than the one painted by adversity.

“For myself,” Purdy said, “there’s times in the game when it’s like, ‘I want to be better. I want to capitalize on third downs and finish when we get in the red zone.’ … But at the same time, man, it’s the NFL. It’s not easy to do everything on your own. I’ve got to do my part on this team, for this team. And everybody’s going to do their part. That’s where the trust comes in.”

So when it was money time, he was right there with his guys. They’ve been in big games. They’ve been behind. They’ve had clutch moments. They’ve weathered postseason storms. Purdy hadn’t until Sunday. But they couldn’t tell.

Last week, against Seattle, his first playoff game, Purdy rattled off one play so fast the huddle didn’t understand it. Kittle told him to take a deep breath and call the play. Purdy was fine after that. Sunday, Purdy needed no such reminders.

“He’s just an impressive guy in the huddle,” McCaffrey said. “It’s not a shock anymore. Just who he is.”

So after a neutral-zone infraction, followed by a 7-yard run by Christian McCaffrey for a first down, Purdy still had his head about him. A naked bootleg to his left was covered well by the Dallas defense. So well that Kittle found an opening that wasn’t part of the scheme. Instead of coming back across the field, as was designed, he improvised and went up the seam, waving his gloved right hand to draw Purdy’s attention.

And Purdy, having felt and gotten comfortable with the immediacy of Dallas’ quickness, wasn’t too rushed on the play to see No. 85 streaking upfield — with only 302-pound defensive tackle Neville Gallimore chasing him. Purdy had missed a few open receivers to this point. But it was winning time, and he didn’t miss this one. After planting near the numbers on the left side of the field, he threw a rope to that moving white glove.

“He gave me a catchable ball, I was just trying to be dramatic,” Kittle said of his juggling catch. “Just for TV.”

It was arguably the play of the game, and he followed it with a perfect throw to McCaffrey on a slant route in traffic. Those two plays not only put the 49ers in Dallas territory, and softened up the defense for the 49ers ground game, they validated the collective swagger in the huddle before the drive. They were going to do this, get into the end zone. Whatever it takes, as Deebo said.

McCaffrey punched it in from 2 yards out. That put Dallas in position to need a touchdown against a 49ers defense that had found its rhythm. It was the control the home team had been unable to grab all game. But when it was time, when the fate of the Super Bowl journey hung in the balance, when the complexities of winning required conquering, their quarterback again showed he was ready.

“He made a number of plays today,” Shanahan said. “By no means was anything perfect — for the whole offense and for the whole team. Just watching them all week, we had a feeling it was going to be this type of game.”

Then after the game, when their home locker room would absorb its final thrilling victory of the season, Purdy emerged from the shower past the media, beneath the soaring music, and unassumingly through the merry mood. His locker was blocked by the gaggle interviewing Dre Greenlaw. So Purdy, the quarterback who is two wins from being champion, stopped at the cubicle of No. 82. He got dressed at tight end Ross Dwelley’s locker.

He may have the eyes of someone built for this. But he still has the disposition of a humble rookie.