There they were, two of the most influential players in the history of the Cal women’s basketball program, desperately scrapping to extend their collegiate careers Sunday.

Instead, seniors Brittany Boyd and Reshanda Gray were left numb, watching helplessly as Texas players celebrated at Haas Pavilion after a 73-70 victory over the Bears in the second round of the NCAA Tournament.

“I did think this would be a year for some championships or some celebrating,” Cal head coach Lindsay Gottlieb said. “It turned out to be a year of almosts.”

After Cal trailed by as many as 12 points early in the second half, Boyd inspired a comeback. The fourth-seeded Bears got the steals, made the desperation three-pointers and grabbed the offensive rebounds needed to get closer. They simply couldn’t stop 6-foot-7 center Imani McGee-Stafford (20 points), who scored enough in the final minutes to keep Texas ahead.

Cal committed 20 turnovers that the Longhorns (24-10) turned into 18 points. And fifth-seeded Texas owned the Bears inside, outscoring them 46-18 in the paint.

Boyd narrowly missed a triple-double, scoring 17 points with 11 assists and nine rebounds. Sophomore Mercedes Jefflo led the team with 22 points. Gray, the Pac-12 Player of the Year, was limited by foul trouble and scored just seven points.

“It’s one of those type of feelings where I want to go two more days, I want to go three more days, four more days,” Gray said. “I’m not going to hang my head, because I had a tremendous time here at Cal.”

Cal’s second half started with a missed shot that was followed by another. Then came two turnovers, three more misses and two more turnovers. Cal committed eight turnovers in the half’s first six minutes. The Longhorns’ 12-0 run gave them a 39-27 lead with 14:06 to play.

The Bears (24-10) were out of sorts offensively. They were firing passes over their teammates’ heads and taking contested mid-range jumpers. The run might have cost them the game.

“I just think we were being too lazy with our passes,” Boyd said. “We just weren’t taking care of the ball.”

After the Pac-12 tournament and NCAA Tournament, Gottlieb said she has a new confidence in the future of the program. Underclassmen such as Jefflo, Gabby Green and Courtney Range all took what they learned from Boyd and Gray and played major roles during the postseason.

“They helped build this program,” said Range, a sophomore. “They changed the face of what this university is, as far as the women’s basketball team.”

Range said Boyd taught her how to be a competitor and how to keep fighting. And Jefflo, who finished one point shy of a career high, said she wouldn’t have come to Cal were it not for the two seniors.

Next season, it’ll be their turn.

“This is how college basketball works,” Gottlieb said. “You pass on what you have in you to the next generation.”

Mike Vernon is a San Francisco Chronicle staff writer. E-mail: mvernon@sfchronicle.com Twitter: @M_Vernon