It was a heckuva shot. It's always hard to lose a game like that. – BYU guard Matt Carlino

PROVO — It appeared BYU had its Hollywood ending in hand when guard Tyler Haws hit a clutch shot with 2.5 seconds remaining, giving the Cougars a razor-thin two-point advantage over Saint Mary's.

But that lead was short-lived.

Gael guard Matthew Dellavedova answered immediately, dribbling down court and burying a 35-foot 3-pointer at the buzzer to lift the Gaels to a dramatic 70-69 victory Thursday night at the Marriott Center.

Officials checked the television monitors to make sure the basket counted. When they indicated that it did — the ball left Dellavedova's hand with 0.6 seconds left — the crowd of 14,857 was silent, and stunned.

"This one hurts," said Haws, who scored a game-high 23 points.

In the end, the classic ending of a classic game belonged to Saint Mary's.

"Dellavedova, he had a lot of space. This happened pretty quick," said BYU coach Dave Rose. "There are a lot of things we can learn from that. He had to make a pretty tough shot. … It came down to a guy making a really tough play late in the game. You have to congratulate Saint Mary's because they played well and got a big win."

Dellavedova had 18 points and guard Stephen Holt added 22, including five 3-pointers.

The Cougars jumped out to a 16-point lead in the first half, only to watch Saint Mary's battle back and seize the lead in the opening minutes of the second half.

The Gaels led by as many as six with 12:19 remaining, but the two teams went back and forth, trading leads.

In the final 1:50, BYU's Brandon Davies fouled out — with 12 points and zero rebounds — and Dellavedova, the crafty senior from Australia, took over, scoring Saint Mary's final six points, including the game-winning 3-pointer.

"It was a heckuva shot," said BYU guard Matt Carlino, who finished with 16 points. "It's always hard to lose a game like that."

For the Cougars, the loss was their first in West Coast Conference play this year. It snapped a six-game winning streak and halted a 12-game home-court winning streak.

The last team to beat BYU here was Saint Mary's, last January. In fact, the Cougars are now 0-3 against the Gaels since joining the WCC.

Saint Mary's improved to 14-4 overall and 3-1 in the WCC while BYU dropped to 14-5 overall and 4-1 in league play.

Saint Mary's outrebounded BYU, 36-29, and had 14 offensive rebounds.

"They were able to get second shots and score," Rose said. "That was a big key for them in their comeback and keeping us from coming back at them. That's their style. That's what they do. That's what they're good at. We just need to be better."

BYU opened the game with a 12-2 run as Carlino, who had been suffering from upper back spasms Tuesday, scored seven consecutive points in the early going.

The Cougars stretched their lead to 20-4, then it was 26-11. Saint Mary's made just five of its first 21 shots from the floor.

"We wanted to come out with a good start," Haws said. "Matt was a big part of that big start at the beginning of the game, hitting shots and being aggressive. We knew they were going to make a run. We kept battling and tried to keep being aggressive."

As expected, the Gaels battled back, as they hit six of their final 10 shots of the half. Saint Mary's trailed by seven at intermission, 34-27.

BYU shot 53.6 percent in the first half, compared to 35.5 percent by the Gaels.

Dellavedova, who averaged 17.3 points per game entering Wednesday's contest, scored just two points at halftime.

For the game, the Cougars outshot the Gaels, 53 percent to 42 percent.

"That was a great college basketball game," Rose said. "It was two teams battling really hard, two teams making plays. I felt like it was a very physical game, and both teams responded to that."

BYU fell behind by six in the second half, but rallied.

"Our guys showed a lot of character when we got behind to come back and take the lead, and make a big shot late," Rose said. "They made one more play than we did."

BYU hosts San Diego on Saturday.