Updated

Lexington, KY (SportsNetwork.com) - Trey Lyles and Tyler Ulis each scored 12 points, as top-ranked Kentucky withstood an early challenge and pulled away in the second half for a 71-52 victory over Buffalo on Sunday at Rupp Arena.

Devin Booker added 10 points and Dakari Johnson contributed nine with 12 rebounds and four blocks for the Wildcats (2-0), who were tested on Sunday after opening the season Friday with an easy 85-45 win over Grand Canyon.

Jarryn Skeete scored 16 points and Rodell Wigginton added 15 for Buffalo (1-1), which beat South Dakota State in its opener on Friday and had serious thoughts of pulling a major upset for 26 minutes on Sunday.

Bobby Hurley's Bulls held a five-point lead at the break and a Skeete jumper gave Buffalo a 45-43 advantage with just over 14 minutes to play.

Kentucky then clamped down on defense and surrendered just two baskets over the remainder of the contest -- the last coming in the final seconds. The offense kicked into gear, too, closing the game with a 28-7 run.

Johnson's layup gave the Wildcats the lead for good at 46-45 and Alex Poythress followed with dunks on consecutive possessions before a Johnson free throw made it 51-45.

Lamonte Bearden's jumper briefly interrupted the Kentucky surge, but it would be Buffalo's last field goal until the last three seconds.

Ulis followed with a 3-pointer and the Bulls never recovered, adding only a Raheem Johnson free throw as the Wildcats pulled away. Booker scored eight of his points over the final nine minutes.

"I told the team at halftime, 'You know what? I'm happy this happened, and if you don't start playing you're going to lose, and I'll even be happy about that,'" said Kentucky coach John Calipari.

The Wildcats won despite a poor shooting effort from Andrew and Aaron Harrison, who combined to make just 3-of-15 shots.

Buffalo stayed with Kentucky throughout the early stages of the first half, never trailing by more than four points. A Ulis three gave the Wildcats their largest lead of the opening 20 minutes at 20-16, but the Bulls immediately answered with the next five.

A Justin Moss dunk a little later capped a run of seven straight points that gave Buffalo a 30-25 advantage with just under 6 1/2 minutes remaining in the first half. The Wildcats responded with an 8-2 run for a 33-32 lead, but the Bulls scored the last six to take a surprising five-point margin to the break.

Lyles and Ulis combined for the first nine points of the second half as Kentucky grabbed a 42-38 edge. Bearden's jumper stopped the Kentucky run and three free throws from Wigginton put the Bulls back on top at 43-42.

"I was really proud of my team and how we competed, particularly in the first half," said Hurley. "Obviously being able to have a halftime lead against this type of opponent was a big thing for us. Hopefully it is a confidence-building performance."

Game Notes

Willie Cauley-Stein grabbed 10 rebounds for Kentucky, which finished with a 45-25 advantage on the boards ... Buffalo shot 44.4 percent in the first half, but made only 21.1 percent in the second half ... Moss finished with eight points and six rebounds for Buffalo, while Bearden also scored eight.