Two-time Olympic MVP Maggie Steffens scored the go-ahead goal with nine seconds left in the fourth quarter to lift the Stanford women's water polo team to an 8-7 win over UCLA, giving the Cardinal its sixth NCAA title as a program and fifth in the last seven years.

Steffens scored three goals to lead the Cardinal, as Stanford had to hold off a hard-charging Bruin squad that tied the game for the first time at 7-7 with 51 seconds remaining on a Maddie Musselman goal out of two meters. UCLA's Kodi Hill stole a Stanford pass to give the Bruins back possession with 31 seconds to go, but Steffens responded with a steal of her own to set up a powerful game-winner as she rose out of the water from about five meters out and muscled the ball into the back of the net.

Thanks to Sunday's triumph, the Stanford athletics department is now tied with UCLA for the most NCAA team championships at 113.

Stanford led 5-2 at halftime and 6-4 after three quarters before the Bruins surged back thanks to Musselman and Alys Williams, both of whom had hat tricks for Brandon Brooks, who is still agonizingly in search of his first national title as head coach at UCLA. Musselman scored the last two goals of the game for the Bruins, the first of which was a contested skip shot from about eight meters in an impressive display of shooting prowess from the 2016 Olympic gold medalist.

Stanford scored on its first possession of the game thanks to a lefty strike from Madison Berggren and went up 2-0 on a power-play goal in transition by Jordan Raney with 3:35 to go in the first quarter before Musselman skipped one in from distance. The Cardinal appeared to take a 3-1 lead when Makenzie Fischer batted one past UCLA goalie Carlee Kapana as the ball floated to the goal line before Kapana slapped it away, but the original call of a goal was overturned, and Stanford's lead remained at 2-1 heading into the second quarter.

[Related video: Stanford women's water polo celebrates school's 113th all-time NCAA title]

Stanford got that goal back when Jamie Neushul skipped one past Kapana just as UCLA was returning to full strength at the end of a Stanford power play one minute into the second quarter. Kodi Hill inched the Bruins to within 3-2, but Steffens scored on consecutive possessions to push the Cardinal edge to 5-2, batting one in off a rebound off her initial shot that was saved by Kapana and then firing in another off a perimter attempt. The Cardinal had a chance to push the lead to four on a 6-on-5, but the Bruins got a key field block to keep the deficit at three goals heading into halftime.

Williams did her best to get the Bruins closer by scoring twice in the third period, first cashing in on a power play and then driving to the cage and slotting home a beautiful cross pass from Mackenzie Barr to cut Stanford's lead to 6-4 heading into the fourth quarter, as Neushul scored a power-play goal for the Cardinal sandwiched in between those Williams tallies. Williams scored once more 21 seconds into the fourth quarter to slice the Bruin deficit to one, but a smothered Steffens somehow found a wide-open Shannon Cleary to give Stanford a 7-5 lead with 6:14 to go to set up the remainder of the thrilling fourth quarter.

Stanford had a slim edge on the 6-on-5, going 3-for-7 on power plays compared to UCLA's 2-for-6 mark. Gabby Stone had 10 saves for the Cardinal, while Kapana stopped nine shots for the Bruins, including a big save in early in the third quarter when the Bruins could have fallen behind by four goals.

This is the third straight year that the women's water polo national championship game was decided on a goal in the final 15 seconds, as Kiley Neushul slotted in a penalty shot with 11 seconds remaining to lift Stanford to the 2015 NCAA title over UCLA and Stephania Haralabidis railed home a shot almost from mid-tank with six seconds left to give USC an NCAA finals triumph over Stanford.