MANHATTAN, Kan. (AP) — Stanford spent most of its NCAA Tournament opener against New Mexico State on Saturday looking a bit lost, which made sense considering the Cardinal were playing about 1,800 miles from home.
They found their way just in time.
Alanna Smith had 19 points and 11 rebounds, Karlie Samuelson hit five 3-pointers and finished with 17 points, and the No. 2 seed in the Lexington Region survived the Aggies' spirited upset bid for a 72-64 victory that earned the Cardinal a trip to the second round.
"You could tell we've been off for two weeks," said Stanford coach Tara VanDerveer, whose team will play No. 7 seed Kansas State in the second round. The Wildcats beat Drake later Saturday.
"Hopefully we got the rust off," VanDerveer said, "and we'll be better on Monday."
The Cardinal (29-5) earned the right to host the tournament's first two rounds, but the Pac-12 gymnastics championships at Maples Pavilion this weekend forced them to head east for their game against the Aggies (24-7), who rolled into the tournament with 17 consecutive wins.
New Mexico State led by as many as nine early before Smith gave Stanford its first lead midway through the third quarter, and Brittany McPhee provided the lead for good midway through the fourth.
McPhee finished with 16 points for the Cardinal. Erica McCall added nine points and 11 boards.
"I think we kept our composure well," Samuelson said. "We've been down plenty of times this year. We always know we can come back from anything, so just keep playing hard."
The undersized Aggies nearly became the first No. 15 seed to advance thanks to a big performance from Brooke Salas, who had 26 points. Moriah Mack added 15 points and Brianna Freeman had 10.
"I think it's an opportunity we missed," Salas said. "When we play our game we can play with anyone and we're not going into any game — ever — playing for a moral victory."
It was evident right from the start that Stanford was in for a rugged matchup. The Aggies made five of their first six shots, were 14 of 25 from the field at halftime — a mark dragged down by six Stanford blocks — and drained five of their first seven 3-pointers.
The final minute of the first half was indicative of the rest of it: The Cardinal committed a shot-clock violation, fouled the Aggies' Tyler Ellis, then failed to get a rebound when she missed the second free throw, allowing Zaire Williams to hit a buzzer-beating 3-pointer.
That gave New Mexico State a 38-31 halftime advantage.
"We had to match up to their size, but they also had bigs guarding guards, so they had to adjust too," New Mexico State coach Mark Trakh said. "It was kind of like our quickness against their size."
But the Cardinal, so poised in March, managed to wipe out its deficit in the third quarter.
Samuelson kept hitting 3s and the Pac-12 champs finally began to use their size advantage, taking their first lead when Smith got loose for a basket inside to make it 43-41 with 4 1/2 minutes left.
Still, the Aggies were clinging to a 49-48 lead after the third quarter, and it began to look more and more possible that the Cardinal — the only No. 1 seed to ever lose an NCAA Tournament game — would also become the first women's team to lose its opener as a No. 2 seed.
But after struggling all game, McPhee scored to make it 54-55 with 7 1/2 minute left. She added a three-point play a couple minutes later, then hit free throws down the stretch to seal it.
"I don't think we took them lightly," Samuelson said. "Every team in this tournament is really good. I think we were prepared for that. ... They're a good team and they played really well."
STATS AND STREAKS
Trakh dropped to 1-17 against VanDerveer while coaching Pepperdine, Southern California and the Aggies. ... The Aggies are 0-5 in the NCAA Tournament. ... Stanford has won 13 straight NCAA Tournament openers. ... The Cardinal had 17 offensive rebounds.
New Mexico State hung tough with one of the nation's top teams in its third straight NCAA trip, proving perhaps that the selection committee made a mistake with its seeding.
Stanford won despite committing 16 turnovers, thanks in part to 50 percent shooting in the second half. The Cardinal shot just 34 percent during the first two quarters.
Stanford faces the Wildcats on Monday night.
More AP college basketball: http://collegebasketball.ap.org and https://twitter.com/AP_Top25Associated Press