It took nearly eight years, but the Bruins finally got the better of the Cardinal.

UCLA men's soccer (4-2-0, 1-0 Pac-12) bested No. 14 Stanford (2-2-1, 0-1 Pac-12) by a score of 2-0 on Thursday night. The Bruins had been outscored 9-0 in their previous five matchups with the Cardinal, and they hadn't beaten their Bay Area rivals in the last 13 head-to-head matchups dating back to 2014.

After a scoreless first half, UCLA started putting on the pressure in the opening minutes of the second, and it paid off with a successful penalty kick.

Sophomore forward Grayson Doody received a pass on the right side of the box, in prime scoring position. His shot was turned away by Cardinal goalkeeper Matt Frank, with the rebound deflecting to the top of the box.

Junior midfielder Riley Ferch made a break for the ball and got tripped up by a contesting midfielder Cam Riley, who took his time going for the clear. The Bruins were awarded a penalty kick, and coach Ryan Jorden picked graduate midfielder Yoni Sorokin to step up and put his team ahead.

The UCF transfer converted for his second goal of the season and his UCLA career as the Bruins went ahead 1-0.

UCLA stood its ground on two Stanford chances within the next five minutes, and its one-goal lead would stand until late in the match.

With just over 10 minutes remaining, a Stanford defender leisurely trotted back toward his own net as Frank sprinted out to take the ball. Senior forward Kevin Diaz snuck in from behind, however, and he deflected the ball as Frank came sliding in at him.

Diaz took advantage of the open net, winning a footrace to the ball and sliding at it to put it away from the top of the box.

The Cardinal had a scoring chance in the final minute, only to miss high, and the two-goal deficit was too much to make up at that point regardless.

Senior goalkeeper Justin Garces made two saves in the 27th and 30th minutes, and that's all he needed in order to tally his third clean sheet of the season.

While Stanford attempted nine shots to UCLA's eight, the Bruins got six of theirs on frame compared to the Cardinal's two. Fouls were pretty even, with UCLA picking up 12 and Stanford notching 10.

The Cardinal had 11 corner kicks and did not convert a single one into a goal. The Bruins' two corner kicks didn't lead to any scoring either, but neutralizing the heavy advantage in Stanford's favor was enough for UCLA to win that battle.

UCLA will be back on the pitch Sunday at 6 p.m. versus California.

Follow Connon on Twitter at @SamConnon
Follow All Bruins on Twitter at @SI_AllBruins
Like All Bruins on Facebook at @SI.AllBruins

Read more UCLA stories: UCLA Bruins on Sports Illustrated
Read more UCLA Olympic sports stories: UCLA Olympic Sports on Sports Illustrated