BETHLEHEM — A true measure of an athlete’s competitive spirit shines through when his back is pinned against a wall and defeat appears imminent.

Brayden Rose sprang off that wall swinging and showed his heart.

Riverside’s junior guard showed signs of frustration after struggling from the free throw line and waging a battle to elude a lightning-quick defensive attack by The High School of the Future. When his team needed him most, trailing in the fourth quarter, Rose packed a wallop with 18 of his game-high 31 points and five of his 11 rebounds.

His effort pushed the District 2 champion Vikings to a 58-51 comeback win in the PIAA Class 3A boys basketball second round Wednesday night at Bethlehem Liberty High School.

Riverside (25-1) earned a rematch with defending state champion West Catholic in quarterfinals Saturday at a site and time to be determined. Last season, West Catholic knocked the Vikings out of the playoffs.

“Every team in the state playoffs is good,” Rose said. “We had a slow start, but fortunately, we came away with the win.”

However, The High School of the Future played with high intensity and speed, especially defensively, which unnerved the Vikings at times.

Nico Antoniacci, who averages more than 30 points per game, scored five of his 16 points in the first quarter, and Riverside battled to a 12-10 lead. However, Antoniacci couldn’t find a rhythm from beyond the 3-point line as The High School of the Future ran defenders who focused much of their attention on the all-state, NCAA Division I prospect.

“They came out in a diamond-and-1 defense, and we haven’t seen that all season,” said Antoniacci, who added five rebounds. “We were practicing a 1-3-1 all week, because that is what they had shown. They came out and shocked us, made some tough buckets, but we had to stay composed.”

In the second quarter, Kareem Chappelle and Shyfi Eason gave The High School of the Future a 19-14 lead.

Riverside responded with Rose and Antoniacci combining for all 11 points, and the teams went to halftime tied at 23.

The High School of the Future then took advantage of some uncharacteristic turnovers by Riverside and increased the pace of the game.

Kasheef Williams, Chappelle, Iseem Craig and Karon Coleman helped The High School of the Future take a 40-32 lead late in the third.

In a sequence that shifted the momentum, a potential turnover by Riverside ended up being a foul and led to free throws. The High School of the Future was also whistled for a technical foul.

Rose, who made only 1 of his first 8 free throws, missed a pair. Antoniacci swished his two awarded because of the technical foul to draw the Vikings to within 40-34.

From there, it was all Rose.

He became aggressive and powered his way through defenders for layups, leaving them trailing as he converted drive after drive. He also made 8 of 10 free throws.

“It definitely was a little scary,” Rose said. “We calmed down and took control of the game, and I started to knock down some shots.”

Rose started the onslaught with an assist to Kyle Connor. From there, he energized the crowd and his teammates, scoring 12 points that featured two three-point plays during Riverside’s 14-1 push that gave it a 50-43 lead it never relinquished.

As The High School of the Future tried to claw back, Rose kept answering. Then, Craig, who finished with a team-high 16 points, made three free throws to cut the Riverside lead to 55-51. Eimer Cruz, who gave the Vikings valuable minutes off the bench with Michael Schimelfenig sitting with foul trouble, connected on two free throws to seal the victory with 18.2 seconds remaining.

“I was ready for this,” Cruz said. “I practice as hard as I can to be ready for moments like this. I am not going to get in all the time, but I have to be ready when I do get in.

“I was very nervous, but I got the job done and knocked them down.”