PROVO — With eight minutes remaining in the game Thursday night, BYU had a 14-point lead on San Francisco and it appeared that the No. 2 seed in the upcoming West Coast Conference Tournament was securely in the Cougars’ hands.

But that was about the time when the ball — and the lead — starting slipping out of BYU's hands. During an awful final stretch for the Cougars, everything unraveled with a flurry of turnovers and missed shots.

Just one week after rallying from a 14-point deficit at San Diego, BYU surrendered a 14-point lead of its own at home as USF came back to stun the Cougars, 77-71, before a crowd of 11,484 at the Marriott Center.

The loss snapped BYU’s five-game winning streak.

“The last eight minutes probably is as dysfunctional as we’ve looked for a while,” said coach Dave Rose. “We turned the ball over uncharacteristically — live-ball turnovers where they could just score layups. You give a lot of credit to San Francisco because they were playing really hard and doing stuff to disrupt us, trapping ball screens. When we go back and look at the film, we’ll see a lot of those mistakes that we created by our own lack of execution.”

The last eight minutes probably is as dysfunctional as we’ve looked for a while. – BYU coach Dave Rose

Frankie Ferrari scored a team-high 23 points for USF, going 5 of 5 from 3-point range and 9 of 12 from the floor. He also added seven assists, six rebounds and seven assists.

While the Dons' Charles Minlend (3 of 14 from the floor) and Jordan Ratinho (3 of 12 from the field) struggled most of the game, they both knocked down key shots over the game’s waning minutes.

“San Francisco, they’re a great team. I thought they made shots down the stretch,” said BYU guard TJ Haws, who scored 25 points. “We had a hard time getting the ball in the basket. But when you’re up (14 points), you should be able to defend to win that game. But give credit to San Francisco. They made big shots. We went on a run that second half but we just couldn’t keep it on them. They made big shots.”

Cougar forward Yoeli Childs scored 28 points and grabbed 14 rebounds in the setback.

BYU (18-11, 10-4) remains in second place in the West Coast Conference standings and still has a half-game lead on San Francisco (21-6, 9-4), but the Dons appear to be in the driver’s seat when it comes to earning the No. 2 seed in the WCC Tournament. The Cougars visit the No. 2 ranked team in the country, Gonzaga, Saturday.

USF finishes the regular season with a game at Santa Clara Saturday, then a pair of home games against San Diego and Loyola Marymount.

Midway through the second half, BYU seemed poised to avenge last month’s 19-point loss to the Dons in San Francisco. But that was before USF finished the game on a 28-8 run over those last eight minutes.

During that span, the Cougars had four turnovers on six possessions, including sloppy ball-handling and poor passing.

“I think we were trying to rush it a little bit. Everyone was trying their best to get our momentum going and it didn’t work out. It’s something we’ve got to learn from and move on,” said BYU guard Zac Seljaas. “They just had energy. They were making shots and they had the momentum. We just couldn’t get a shot to fall to stop their momentum. They were just rolling. It’s hard to go against a team with that kind of energy.”

BYU went six minutes without a field goal — from the eight-minute mark until the two-minute mark.

“When we have a game with 12 assists and 14 turnovers, that’s not really the way we play. A lot of credit to San Francisco to get us out of our rhythm, especially late in the game,” Rose said. “We had a lot of good looks and they didn’t go in. Then the frustration built on the last shot, trying to make the next shot and we’re still worried about missing the last shot. We need to do a better job of playing the next play and not letting the last play determine what we’re doing.”

The Cougars and Dons exchanged leads throughout the first half. USF drilled nine 3-pointers in the first half but BYU led for most of the half.

Ferrari knocked down his fourth 3-pointer of the first half with 1.6 seconds remaining to cut the Dons’ deficit to 35-34. After that 3, USF inexplicably called timeout. So BYU put Haws, who had two fouls and had been sitting on the bench, back into the game. Haws buried a 30-foot 3-pointer at the buzzer to give the Cougars a 38-34 edge at intermission.

BYU’s momentum continued to build over the first 12 minutes of the second half until the Cougars collapsed over the final eight minutes.