LINCOLN, Neb. (AP) — Nebraska led Jacksonville State by 15 with just 7 minutes left Tuesday night. Then, Brandon Ubel said, the Cornhuskers relaxed.

Jacksonville State rallied, cutting the Nebraska lead to one and missed a wide-open layup in the last 20 seconds that could have tied the game before Dylan Talley hit a pair of free throws to give the Cornhuskers a 59-55 win.

"We just kind of stopped playing," said Ubel, who led Nebraska with 15 points. "I think we looked up at the scoreboard and felt a little too comfortable. You give Jacksonville State a lot of credit. They didn't stop playing. They played for 40 minutes and we played for 32. ... Until we play a good 40 minutes of basketball, we might struggle a little bit."

Nebraska (7-3) led 50-35 after Talley made two free throws. Jacksonville State (8-3) then outscored the Cornhuskers 18-4, closing within 56-55 on Ronnie Boggs' corner 3-pointer with 23 seconds left.

Nebraska's Ray Gallegos made one of two free throws to put the Huskers up two. Then Jacksonville State's Chris Deanes drove the lane, missing a wide-open layup. Talley was fouled on the rebound and hit the clinching free throws.

"You can't get mad about the drive, he had a lane," said Jacksonville State coach James Green. "You have to take what the defense gives you and that is what they gave us. His momentum carried him too far and he laid it up off the back of the rim."

Jacksonville State hit 9 of 10 free throws during its stretch surge. Nebraska made 5 of 8 from the line during that period, but managed only two field goals in the final 7 minutes while the Gamecocks hit five.

"Our effort was really good, we had some guys obviously didn't shoot well," Green said. "Going into the game we thought we would have to shoot the ball well in order to have an opportunity. We shot 28 percent from (3-point range) and 36 percent overall, we did get to the line quite a bit in the second half. . more than we did in the first half, I think that had a lot to with us getting back into the ballgame."

Shavon Shields had a career-high 14 points and Talley finished with 10 for the Cornhuskers, who came back after losses to No. 17 Creighton and Oregon — the latter a 22-point rout on the road.

Darion Rackley led Jacksonville State with 17 points, nine in the closing rally. Tarvin Gaines had 13 points. Boggs added 11 points and Brian Williams finished with 10 for the Gamecocks.

The Huskers had held Jacksonville State to four field goals in an 18-minute stretch, taking a 35-24 lead on Brandon Ubel's fast-break layup with 16:28 remaining.

But Nebraska also struggled midway through the first half, getting just one field goal in a 7½-minute stretch. The Gamecocks then went cold, making just one basket in the remainder of the half.

Nebraska finished the first half on a 16-2 run, going ahead for good on Ray Gallegos's 3-point play with 2:06 left that made the score 24-22.

"We had a great defensive stand in the half: eight straight, 13 out of 14 possessions," said Nebraska coach Tim Miles. "We went from up five to down seven to up seven, and that was really good defense. I thought we did a lot of good things. But you've got to finish the ballgame. It's a 40-minute game and you've got to have some courage. That helps."

Regardless of the finish, Ubel said the win was important for Nebraska, which had lost its last two games coming into Tuesday.

"It's big to get a win," he said. If we want to get to any kind of post-season at all, we've got to gut these next few out and then get into conference play and try to sneak a couple on the road and take care of home court. This game tonight and the next three are big for us. We've got to stay focused and put a full 40 minutes together."