Despite trailing for most of the game, second-seeded Kansas pulled off a late comeback and defeated 10th-seeded Purdue, 63-60, in the NCAA tournament round of 32 on Sunday. The Jayhawks advanced to face North Carolina State in the Midwest Region semifinals.

Purdue was “much better than us for a majority of the game,” Kansas Coach Bill Self said. “We just kind of hung in there and kind of got a little rhythm there late. But mainly, we just had some guys make some great individual plays late.”

With less than 30 seconds to play, Kansas guard Elijah Johnson stole the ball from Purdue guard Lewis Jackson and scored a transition layup to push the Jayhawks into a 61-60 lead with 23 seconds left.

Purdue forward Robbie Hummel missed a three-point attempt with nine seconds remaining. And a quick upcourt pass to Kansas guard Tyshawn Taylor led to a transition dunk with 2.5 seconds left that sealed the final margin.

Kansas (29-6) remained within reach early in the second half by leaning on Johnson and by limiting Hummel’s access to the ball. After tallying 22 points on 7-of-8 shooting in the first half, Hummel took one shot and did not score during the first 12 minutes of the second half. He finished with 26 points.

“I felt like [Hummel] was just throwing a rock in the ocean, man,” said Taylor, who finished with 10 points. “He was knocking everything down. When stuff like that happens, it’s kind of hard not to think, ‘Dang, when is he gonna miss?’ We had to change something defensively.”

Rather than continue to stick one of its big men on Hummel, Kansas assigned guards Johnson and Travis Releford to defend Purdue’s agile, hot-shooting forward. Hummel made 2 of 5 shots in the second half, during which Purdue (22-13) shot 28.6 percent as a team.

“We was just trying to give him different looks and make him feel uncomfortable,” said Releford, who finished with 10 points. “In the first half, he was getting wide open shots. . . . We knew coming into the second half we had to make him take tougher shots than he did in the first half.”

Johnson, meantime, scored eight of Kansas’s first 17 points after the break and largely kept the Jayhawks afloat while their more prominent scorers struggled to find their shooting rhythm. Jayhawks forward Thomas Robinson, the Big 12 player of the year, shot 2 for 12 from the field Sunday, though he finished with 11 points and 13 rebounds.

Kansas shot 33.9 percent from the field and made 6 of 24 three-point attempts (25 percent).

Yet it kept itself in contention with a solid effort on the offensive glass. Kansas grabbed 21 offensive rebounds.

And then there was Johnson, whose three-pointer with just more than three minutes to play in regulation gave Kansas its first lead of the night. He finished with a team-high 18 points.

“I just was confident in the shot when I took it,” Johnson said of his late three-pointer. “I didn’t want to second guess it. I second guessed a couple of them in the first half and came up with air balls. So at halftime we talked as a team and said no more second guessing, and I just remembered that.”