LEXINGTON, Ky. (AP) For 20 minutes Buffalo staggered No. 1 Kentucky with the smashmouth aggression that coach John Calipari wanted for his young, talented team.
To his delight, the Wildcats opened the second half with a quick flurry of blows that helped seize a hard-fought victory.
Trey Lyles lifted Kentucky out of a funk with five straight points to begin a 9-0 second-half run, and Tyler Ulis scored 12 points on four 3-pointers to help the Wildcats rally for a 71-52 victory over Buffalo on Sunday.
Trailing 38-33 at halftime, Kentucky used a 3-pointer and subsequent steal and dunk by Lyles to get back on track. The 6-foot-10 freshman forward finished with 12 points on 4-of-5 shooting as the Wildcats pulled away from the stubborn Bulls (1-1) in the final 20 minutes.
''The opportunity presented itself and I took it,'' said Lyles, who finished with 12 points on 4-of-5 shooting and 4 rebounds.
The Wildcats (2-0) shot 41 percent (25 for 61) from the field. But they clamped down on Buffalo down the stretch, holding the Bulls to 4-of-19 shooting in the second half and 35 percent overall.
''It seemed like our shots in the second half were a lot more contested and a lot more difficult to find,'' second-year Buffalo coach Bobby Hurley said.
Playing their second game in 40 hours and seeking a strong tuneup with No. 5 Kansas awaiting Tuesday in Indianapolis, the Wildcats instead got the adversity that Calipari sought after Friday's 40-point blowout win over Grand Canyon.
''Now we go (play) Kansas and it's the same thing,'' Calipari said. ''We probably need another hit in the mouth to see where we are.''
Buffalo got off to a nice start in the program's first game against a No. 1 team.
Unfazed by the Wildcats' size and talent, the Bulls countered with a relentless approach under Hurley, the former Duke star.
A quick tempo and 44 percent shooting put the Bulls in front at the break. The speedy trio of guards Lamonte Bearden, Jarryn Skeete (16 points) and Shannon Evans kept the Wildcats busy.
First-half foul trouble for Karl-Anthony Towns, who eventually fouled out, and Andrew Harrison (two) also forced Calipari to move from a two-unit system to a matchup-based mix of players from both groups. Kentucky shot 34 percent and committed 10 first-half turnovers.
But the Wildcats' second unit turned it around in the second half, with Lyles, Ulis, Devin Booker (10 points) and Dakari Johnson (nine points, 12 rebounds) shouldering the load.
''It was good for someone to come out and finally hit us in the mouth and show what we were about,'' Ulis said. ''We're going to fight to the end and play hard no matter what. We knew we had to execute to win.''
Rodell Wigginton added 15 points for Buffalo.
Air Force senior master sergeant James A. Allegrezza followed up a video greeting from southwest Asia by surprising his wife and two children during Sunday's game.
Andrew Harrison's lob inside to Alex Poythress initially looked underthrown, but the junior forward scooped it out and slammed it home in one motion for the basket and 50-45 lead with 12 minutes left. Poythress' dunk came 40 seconds after another one on a pass from Willie Cauley-Stein.
Buffalo: The Bulls shot 4 of 7 from 3-point range in the first half and held Kentucky to 3 of 14 from behind the arc. They went 0-for-5 in the second half. ... Skeete and Wigginton combined for 24 first-half points but had just seven between them in the second. ... Hurley was booed during introductions, another sign that some Kentucky fans are still sore about his part in helping Duke beat the Wildcats in that epic 1992 NCAA tournament game decided by Christian Laettner's turnaround jumper at the buzzer.
Kentucky: After going scoreless in his debut, Booker recorded his first career points on two first-half free throws. ... Cauley-Stein finished with 10 rebounds.
Buffalo: Visits UT-Arlington on Tuesday.
Kentucky: Takes on Kansas on Tuesday in Champions Classic.