Santa Barbara, Calif. — Seventh-ranked UCLA scored the tying goal with three seconds on the clock and then won in the seventh minute of overtime to complete an improbable 2-1 comeback at 13th-ranked UC Santa Barbara.

Brian Iloski got the Bruins to overtime when he drew a foul just about one yard outside the box with five seconds left in regulation. The referee stopped the clock, and Iloski's perfectly-placed free kick went up and over the wall, dinged the crossbar and went in past UCSB goalkeeper Titouan LeRoux for the equalizer.

The Bruins (4-1-1) kept the momentum with them in the overtime and ended the game in the 97th minute. Jackson Yueill and Abu Danladi executed a nice give-and-go, with Danladi hitting a streaking Yueill. LeRoux came up to challenge, and Yueill shot past him, first hitting the right post and then bouncing in for the golden goal at 96:05.

"Tonight we had to dig deep and show character to win a game that presented numerous challenges," said UCLA head coach Jorge Salcedo. "We made the game difficult for ourselves through inconsistent moments but showed resiliency to win in overtime."

UC Santa Barbara (4-3-0) had the lead for most of the game, scoring at 13:43 on a goal by Kevin Feucht on a breakaway after a through ball by Noah Billingsley.

The Bruins had a few chances in the first half to tie, but Iloski's shot on goal was saved in the 18th minute, and Hernandez had a well-hit shot saved by LeRoux in the 23rd minute. LeRoux also made another big stop later in the half, when a UCSB clearance in the box went off a Gaucho player's back, but LeRoux pounced on the ball before the Bruins could get to it.

Bruin goalkeeper Juan Cervantes had a big save of his own in the 65th. Nick DePuy had a good look at goal in the box, but Cervantes made a fingertip save to push the ball over the end line. The Gauchos nearly scored on the resulting corner kick, but Feucht's shot went high.

The Gauchos outshot the Bruins, 9-7, but only had two shots after halftime.

"While we're happy with the result, we still have several things to work on and get better at, and that's what we'll do in the upcoming week," Salcedo said.

The Bruins will next play at Cal Poly on Friday at 8 p.m.