The Stanford women have reached the NCAA’s Sweet 16 for the 12th straight year. Now they hope Chicago is their kind of town.

A huge third quarter propelled the second-seeded Cardinal to a 72-63 win over BYU on Monday night, extending their all-time NCAA Tournament record at Maples Pavilion to 38-4.

The Cardinal (30-4) will play Missouri State, one of the Cinderellas of the tournament, in the Sweet 16 in the Chicago Regional on Saturday.

The 11th-seeded Lady Bears upset third-seeded Iowa State 69-60 after knocking off sixth-seeded DePaul in the first round.

Stanford joined four other Pac-12 teams in advancing to the third round. Already in were Oregon, UCLA, Arizona State and Oregon State.

Playing her final game at Maples, Alanna Smith had 17 of her 23 points in the second half and grabbed 14 rebounds.

“My teammates told me to keep shooting,” Smith said. “They would go in eventually. ... It hasn’t hit me yet, but I loved playing at Maples. I’m definitely going to miss it. It was the best four years of my life.”

DiJonai Carrington, who carried the Cardinal with 14 points in the first half, finished with 19. Kiana Williams added 13 points and five assists.

“We struggled shooting obviously in the first half,” Carrington said. “It wasn’t any one person. ... It wasn’t a beautiful offensive game for us, but we found a way to win.”

Freshman guard Shaylee Gonzales poured in 32 points for the Cougars (26-7), whose nine-game winning streak was snapped. Gonzales hit all four of her 3-point tries.

“They have a really special player in Shaylee Gonzales,” Stanford head coach Tara VanDerveer said. “We had all we could handle with her.”

After leading 31-29 at the half and trailing 35-34 early in the third quarter, the Cardinal put together a 16-0 run.

Lexie Hull’s 3 put Stanford ahead 37-35, and Williams connected on an NBA-distance 3, barely beating the shot clock.

Smith scored from inside, and Carrington converted a three-point play. Smith nailed a 3 from the corner and an off-balance bank shot for a 50-35 lead.

Stanford outscored BYU 22-9 in the third quarter, taking a 53-38 lead.

The Cougars were 0-for-10 from the floor during the run.

BYU scored nine straight points in the final minutes to close the margin to 68-59.

The Cardinal led most of the first quarter, but Paisley Johnson’s jumper put the Cougars up 12-11 and they led at the first break 15-11. Stanford made just 5 of 20 shots in the quarter.

A 3 by Johnson widened BYU’s lead to 18-11 at the start of the second quarter before Carrington scored eight straight points, including back-to-back 3s, to help give Stanford a 20-18 lead.

The quarter turned into a contest between Carrington (14 points) and Gonzales (nine). Carrington had three triples in the quarter and hit a two-point jumper for a 31-29 halftime lead with two seconds left.

BYU gave Stanford all it could handle in the half, even outrebounding the Cardinal 26-25. Sara Hamson, the Cougars’ 6-foot-7 sophomore center, had six rebounds by the intermission. The lead changed hands seven times.

Briefly: Smith is only the fourth NCAA women’s player in the past 20 years to post at least 1,600 points, 200 blocks and 150 3-pointers in her career, joining UConn’s Maya Moore and Breanna Stewart and Delaware’s Elena Delle Donne. … BYU had three wins this season over WCC regular-season champion Gonzaga, which knocked off Stanford 79-73 in Spokane, Wash., on Dec. 2. … BYU had reached the second round for only the fourth time in program history.

Tom FitzGerald is a San Francisco Chronicle staff writer. Email: tfitzgerald@sfchronicle.com Twitter: @tomgfitzgerald