STANFORD, Calif. (AP) -- Stanford nearly let a 30-point lead slip away. California almost pulled off a monumental comeback against its biggest rival with a furious late-game rally.
Chiney Ogwumike had 23 points and 12 rebounds and No. 4 Stanford held off a late charge by 21st-ranked California for a 70-64 win Thursday night in the first of two meetings between the rivals over a four-day span.
''We played really well for, I want to say, about 30 minutes out of 40 but the games are 40 minutes long,'' Stanford coach Tara VanDerveer said. ''The end of the game had to get everyone's attention on our team and we need to get ready on Sunday against them again.''
Karlie Samuelson came off the bench to score 12 of her 14 points in the first half for Stanford (20-1, 9-0 Pac-12), including a baseline 3 to beat the halftime buzzer. The Cardinal led by 30 with 13:35 to go before the Golden Bears fought back to make things interesting in the closing moments.
Brittany Boyd led Cal (14-6, 6-3) with 25 points and Afure Jemerigbe added 18 just more than a year after the Bears won 67-55 on Stanford's home floor on Jan. 13, 2013, to split the season series and help them grab a share of the Pac-12 crown with the Cardinal. That also snapped an 81-game home winning streak for Stanford at Maples Pavilion against conference opponents.
''It was in the huddles, we were still motivated,'' Boyd said. ''One thing about this team, we have heart - even if we're down 50 we're not going to give up. Everybody added something different.''
Jemerigbe's 3-pointer with 17 seconds left pulled Cal to 69-64.
The Cardinal ran their winning streak to 19 straight since a Nov. 11 loss at No. 1 Connecticut, and they had won their first eight conference games by an average of 25 points.
Once Ogwumike got warmed up, she dominated in the paint on both ends of the court. She shot 9 for 19 while facing physical defense. Mikaela Ruef added 12 rebounds and Taylor Greenfield 10 points.
Now, these teams will turn around and play again Sunday afternoon, this time at Haas Pavilion in Berkeley.
''I keep talking about that to our team, 'We need to play 40 minutes,''' Ogwumike said. ''It's not strange by any means. We expect that with rivalry. They know us, we know them. It comes down to who wants it more, and I think they wanted it more toward the end.''
Cal, coming off a season in which it reached the program's first Final Four, nearly overcame a cold-shooting first half and matched Stanford on the boards at 44. The Bears shot 6 for 16 from 3-point range to Stanford's 5 of 19.
''We need to have a spirited rivalry, and that's good,'' VanDerveer said. ''We had a lot of people missing point-blank shots. Whether it was a lack of focus or whatever we didn't keep the pedal to the metal. It was disappointing. We don't feel good about how we finished. We didn't put them away.''
Cal leading scorer Reshanda Gray, who came in averaging 17.3 points, didn't score on three field-goal attempts while being limited to 14 minutes. She was whistled for her second foul at the 10:44 mark of the first half and took a seat.
In the second half, coach Lindsay Gottlieb stuck with a lineup she thought was working best. After the game, she told Gray, ''We're rolling with you, next game.''
The Bears trailed 59-29 before a 14-0 run to pull to 59-43 on Mercedes Jefflo's layin with 9:10 to go. But Cal didn't shoot a free throw until Gennifer Brandon made the first of two attempts with 5:45 left.
Boyd and 6-foot-3 Stanford forward Erica McCall got tangled up beneath the Cal basket with 12:17 remaining and Boyd was called for a personal foul, then the play went to review and stood. Boyd looked visibly frustrated.
Cal hasn't won back-to-back games at Maples since a four-game winning streak from the 1980-81 to 1985-86 seasons. In fact, the Bears don't have consecutive wins against Stanford at any venue since a six-game unbeaten run spanning those same years.
Stanford used runs of 10-3 and 9-0 in the first half on the way to a commanding 43-25 lead at the break, then built that to as many as 30 points.
Starting Stanford freshman guard Lili Thompson limped off with 1:53 before halftime after appearing to bang her right knee on another player, but was fine and finished with eight assists.