Arizona came to Maui to face adversity. There was some back in the desert through the first four games, though most of that was self-inflicted.
Faced with their first big challenge of the season, the third-ranked Wildcats went toe-to-toe with Kansas State and put themselves on the brink of a tournament title.
Kaleb Tarczewski scored 18 points, Gabe York added 15 and No. 3 Arizona hung on to win its first close game of the season, beating Kansas State 72-68 Tuesday in the Maui Invitational semifinals.
"We're very, very proud of tonight's win," coach Sean Miller said. "We feel like we beat a great team, and that's why you come to Maui: to challenge (yourself)."
Arizona (5-0) rolled through its first four games despite some slow starts and shot 53 percent against Kansas State, yet couldn't shake the scrappy Wildcats.
Trailing by nine in the second half, Kansas State (3-2) whittled the lead down to a single possession in the final minute behind Marcus Foster.
Arizona rose to the challenge.
Freshman forward Stanley Johnson spent most of the second half in foul trouble, but came up with some of the biggest plays down the stretch. He had a key steal and hit three free throws in the closing seconds, finishing with 14 points and seven rebounds.
Tarczewski held his own against Kansas State's hulking duo of Stephen Hurt and Thomas Gipson, making seven of nine shots while playing steady post defense
Rondae Hollis-Jefferson had two monster dunks midway through the second half and hit two free throws with 4 seconds left to seal Arizona's victory.
Next up is a chance to win the program's second Maui Invitational on Wednesday night at Lahaina Civic Center.
"It kind of shows how resilient this team is," said Arizona point guard T.J. McConnell, who had seven points and six assists. "The score was going back and forth, and you weren't really sure which way the score was going to go. I mean, we just played hard."
So did Kansas State, which held on down the stretch to beat Purdue in its Maui opener and didn't wilt under Arizona's pressure.
K-State answered nearly every time Arizona tried to pull away, mainly behind Foster.
He held the Wildcats together against Purdue and had 23 points against Arizona, going 6 for 9 from 3-point range.
Kansas State is headed to the third-place game, but had no reason to be down after keeping up with the No. 3 team in the country.
"I told them if we play like yesterday and today, we're going to beat a lot of good teams," Kansas State coach Bruce Weber said.
Arizona has been plagued by slow starts this season, and the Maui opener against Missouri was no different. The Wildcats, as they did in previous games, pulled away in the second half for a 19-point win — but they probably couldn't have afforded another uninspired start against Kansas State.
In their tournament opener, the Wildcats jumped on Purdue early and kept the Boilermakers at arm's length in the second half to pull out a physical victory.
A fast start was no problem for either team in the semifinals.
Playing quickly in both directions, Arizona and Kansas State traded athletic plays — Johnson's tomahawk dunk down the lane was a highlight — and baskets in an entertaining opening 10 minutes.
Neither team was able to get much separation, and the half ended with Hurt jamming in a putback at the buzzer to pull Kansas State to 31-30.
The second half continued the same way until McConnell and York hit consecutive 3-pointers to put Arizona up 52-43 midway through.
Kansas State clawed its way back, pulling to 66-64 on a 3-pointer by Foster with 2:30 left.
K-State kept fighting back each time, but couldn't complete the comeback as Arizona hit six of eight free throws in the final 22 seconds.
"Just some little plays here and there that we could have easily found a way to win it," Weber said. "Just a little more discipline and some little execution."
Kansas State: Foster is a combined 16 for 28 the past two games after going 1 for 13 in a loss to Long Beach State.
Arizona: Johnson was called for two fouls 90 seconds into the second half and had to sit down with four. He returned 6 minutes later for a short stint and came back with 7:15 left. ... Hollis-Jefferson had six points and eight rebounds.
Kansas State faces Pittsburgh in Wednesday's third-place game.
Arizona will play No. 15 San Diego State in Wednesday night's title game.
ARIZONA'S FREE THROWS
Arizona has struggled shooting free throws most of the season, but had a good night against K-State. The Wildcats made 20 of 28 and hit the big ones they needed down the stretch.