BYU paraded to the free-throw line in a physical, hard-fought Big 12 game and outlasted UCF 90-88 in front of 15,590 Tuesday night at the Marriott Center.

The Cougars were 40 of 46 from the line and 8 of 23 from 3-point range to improve to 6-5 in Big 12 play, 18-6 overall. It is the first time this season that BYU is above .500 in league play.

UCF, which lost to BYU 63-58 in Orlando a month ago, fell to 4-7 and 13-10.

The Knights made four 3-pointers in the final minute and a 2-pointer with .7 seconds remaining to almost pull off a miraculous comeback.

Jaxson Robinson led BYU with 21 points, while Noah Waterman and Trevin Knell added 17 points apiece for BYU.

Here are three keys to BYU’s two-point win:

• After shooting 10 of 21 from the 3-point line in Saturday’s 72-66 win over Kansas State, the Cougars won it from the charity stripe Tuesday night in a game that featured 46 fouls and lasted nearly two and a half hours.

Robinson was 12 of 13 from the line, while Waterman was 9 of 10 and Knell was 10 of 13.

The Knights were 14 of 26 from the free-throw line.

• UCF can’t seem to shoot effectively from the 3-point line against BYU when it really matters. The Knights made their first three 3-pointers in Orlando, then missed 15 straight.

They missed all five of their 3s in the first half Tuesday night and their first attempt in the second half before Jaylin Sellers snapped the streak of 21 consecutive misses against BYU with a triple with 18:11 remaining in the second half.

The Knights finished 6 of 22 from beyond the arc Tuesday thanks to their furious finish.

• BYU continues to struggle to hold big second-half leads. The Cougars led at halftime for the ninth time in their 11 Big 12 games, taking a 39-26 lead at the break behind Robinson’s big 3-point shots.

Waterman’s triple and free throws out of the half gave BYU a 48-29 lead with 17:18 remaining in the game, but the turnover bug hit, and hit hard, as UCF turned up the heat defensively, put on a wicked full-court press at times and got back in the game.

The Knights turned 17 BYU turnovers into 27 points.