LOS ANGELES — Imagine getting 20 steps from the top of Mount Kilimanjaro and losing your footing.

Picture Ellis Island from a few miles out, on a rickety boat from Dublin, only to watch the boat spring a leak.

They say close only counts in horseshoes and hand grenades, and it was as if one blew up in UCLA’s face on Thursday night in a 79-75 loss to No. 1 Arizona at Pauley Pavilion.

The Bruins showed some fight, some moxie, only not enough, not when it counted, and the Wildcats claimed the lone regular-season matchup between the two foes.

UCLA had been in precarious positions twice before Thursday’s game, and twice they crumpled faster than a Jenga tower on one block.

Against Missouri in Columbia on Dec. 7, UCLA led by double-digits less than 13 minutes into the game, still led by 10 with 17:49 left, and then sat idly by as the Tigers roared back to take an eight-point lead less than 12 minutes later in an 80-71 Missouri win.

Against Duke at Madison Square Garden 12 days later, the Bruins were down two with 15:33 left. Exactly four minutes later, the deficit was 12, UCLA never got any closer than eight, and the Blue Devils spoiled the Big Apple tour with a 17-point win.

Thursday, they rallied late — scoring 13 straight points to pull even — before falling.

“I thought we made strides, to be honest with you,” first-year coach Steve Alford said. “I told the team that. Missouri, we did a good job in the first half, second they made a run at us, we could never catch them. We didn’t have the same amount of intensity. Then we play Duke in Madison Square Garden, tie game at halftime, they get a little lead, and the last five, six minutes, we didn’t have near the fight we had tonight.”

A year after the Ben Howland era ended unceremoniously — despite three UCLA wins over Arizona — Alford has the Bruins running. Only on Thursday, for much of the second half, they were running on empty.

A 48-46 Arizona lead with 16:21 to play ballooned to 12 with 11:22 left in the game as the Wildcats went on a 12-2 run as five different players scored baskets. When Nick Johnson slammed home a thunderous dunk with just over six minutes left to put Arizona up 13, Pauley Pavilion exploded — for the visiting Wildcats, as a sizable contingent let its voice be heard with one of many “U of A” chants.

Close the book on UCLA, the story read at the time, the Bruins were collapsing like folding chairs. But UCLA opened the book back up and wrote another chapter, steadily chipping away at the bigger, stronger, sometimes-faster Wildcats, even claiming a one-point lead on a Bryce Alford free throw with 1:44 left.

Arizona closed it out, though. And despite “strides,” as Alford called them, UCLA was left winless in its big matchups this year.

“Being down to a very good team 10 or 12 with not so much time left, I thought we did a very good job of fighting,” UCLA’s Kyle Anderson said.

“In previous losses, we had games we would shut down (when we were) down 12 with four (minutes) left. We just have to put it together in the end.”

Easier said than done against the No. 1 team in the country, particularly when Arizona finally started converting free throws and stopped turning the ball over.

The Wildcats, who have trailed at halftime five times this year but rarely had to sweat out the last few minutes, had just one of their 17 turnovers in the last five minutes while picking up a pair of UCLA gaffes in the game’s final two minutes.

A consistently mediocre team from the free-throw stripe, Arizona hit 9 of 11 to close out the game.

Asked about the frustration of losing a winnable game, Anderson conceded.

“Yeah, especially going up one down the stretch,” Anderson said. “We did all we could. I’m not one for moral victories, but we did fight hard.”

The sensational sophomore, who had 16 points and 11 rebounds, called it a missed opportunity at the post-game press conference. As he talked, teammate Jordan Adams, who had 12 points and 11 rebounds but shot just 4 of 15 from the field, sighed, shook his head and rubbed his face.

Later, Anderson was asked how frustrating it was to get so close only to watch it slip away, particularly as that’s the only time they’ll meet this season, barring a Pac-12 tournament or NCAA tournament matchup.

“Knowing we don’t play them again is very tough,” Anderson said. “It leaves a very bad taste in your mouth.”