BERKELEY — Chiney Ogwumike was battling constant double teams, and her teammates never got going from the 3-point line.

Though the Stanford women’s basketball team played right into Cal’s defensive game plan, the No. 4 Cardinal still won 79-64 at Haas Pavilion on Sunday to complete a regular-season sweep over its rival.

Ogwumike scored 29 points despite the extra attention, while her Stanford teammates made the shots off the dribble and midrange jumpers that No. 21 Cal wanted them to take.

“It’s such a problem with Chiney inside, but then I thought their other players did things that we were trying to make them have to do,” Cal coach Lindsay Gottlieb said. “They were just better getting done what they needed to get done.”

Stanford led by as many as 14 points in the first half and 19 with 7:40 to play in earning its 27th straight win against Pac-12 opponents.

And unlike its first Battle of the Bay win on Thursday, there was no frustration at the end.

Stanford (21-1, 10-0 Pac-12) was composed down the stretch this time after it had let a 30-point lead get whittled to five in the final minute of that 70-64 win.

The Cardinal made 12 of 14 free throws in the final four minutes to seal the win after Cal got as close as 64-55 with 3:39 to play.

“My question to our team before the game was, with the end of the last game, who did it help more?” Stanford coach Tara VanDerveer said. “Did it help get our attention? I think it did. We came out and played really well.”

Mikaela Ruef added nine points, 11 rebounds and a team-high five assists. Stanford also got another solid outing from freshman Karlie Samuelson, who came off the bench to contribute 16 points.

Cal (14-7, 6-4) saw Stanford take its first double-digit lead when the Bears offense went stagnant in the last 10 minutes of the first half.

“We were settling too much,” said guard Brittany Boyd, who led the Bears with 20 points and six assists.

Senior guard Mikayla Lyles added a career-high 16 points and was especially deadly from the outside in her second career start for Cal.

But the Bears didn’t get much production from their post players.

Forward Reshanda Gray, Cal’s top scorer on the season, finished with seven points and five rebounds before fouling out with 5:09 to play. She was held scoreless in the Bears’ first meeting with Stanford.

“I think Tara is the mastermind of trying to really limit other teams’ top scorers and make somebody else beat you,” Gottlieb said.