Three nights after upsetting top-ranked UConn, the Stanford women were brought to earth by a deep and aggressive Texas team Thursday night.

The No. 10 Longhorns had their way in the paint on the offensive end and outlasted the No. 6 Cardinal in overtime 87-81, snapping Stanford’s 28-game home winning streak.

After trailing almost the whole way through regulation time, Stanford (2-1) took a 74-73 lead on a three-pointer by Bonnie Samuelson with 1:43 left. But a driving jumper by Texas’ Empress Davenport just before the buzzer sent the game into overtime at 75-75.

In the extra session, freshman guard Ariel Atkins scored the Longhorns’ first five points, and Stanford couldn’t get the big basket or the big stop it needed.

“It didn’t look like we had the pep in our step that we needed,’’ Stanford coach Tara VanDerveer said. “Credit Texas. They were extremely aggressive. I thought they had more energy than we did. They didn’t back down. They did a great job of going inside.’’

Despite missing 6-foot-7 preseason All-American Imani McGee-Stafford because of a leg injury, the Longhorns (2-0) held a 44-37 advantage on the boards. They also outscored the Cardinal 34-24 in the paint.

Nneka Enemkpali, who led the Longhorns in scoring and rebounding last season, scored 16 of her team-high 18 points in the second half. Listed at 6-foot-1, she plays considerably bigger. Atkins scored 16 points for the Longhorns, while Kelsey Lang had 14 and Davenport 13.

Enemkpali called the victory “a reestablishment of this program.’’

As usual, Stanford relied on its guards – both Texas natives – for scoring. Lili Thompson scored 28 points, and Amber Orrange added 15 before fouling out in overtime.

Stanford made just 7 of 27 three-point attempts and sabotaged itself with a 28-for-38 performance at the foul line.

“We definitely have things to work on regardless of our win over UConn,’’ Thompson said. “We’re still a young team. It’s still early in the season. … We want to be playing our best in March.’’

It was the Cardinal’s first loss at Maples Pavilion since Cal beat them 67-55 on Jan. 13, 2013.

Thanks to Monday’s 88-86 overtime win over UConn, Stanford was already ranked No. 1 in one poll, the USA Today coaches poll, which issued its rankings Tuesday morning. The next Associated Press poll won’t be issued until Monday morning.

VanDerveer praised her guards but said the other players are going to have to shoulder more of the offensive load. They’ll also need to take some of the rebounding load off freshman Kaylee Johnson, who had a game-high 13 boards. She was exhausted from playing 38 minutes.

It was a very physical game in which 51 fouls were called, 30 on the Longhorns.

“We have a saying: Every disappointment is a blessing,’’ Orrange said. “We don’t like losing, but this experience will be a really good learning tool for us.’’