It wasn't pretty for Gene Keady's 500th game as a Division I coach, but it was a victory.

Purdue came alive in the final 10 minutes Wednesday night to erase a 12-point deficit and defeat Weber State 89-75 at Mackey Arena.Keady, whose record now stands at 343-157, wasn't surprised Weber State gave his club such a hard time.

"They had been getting kicked by us and weren't going to take it again," he said.

Cuonzo Martin scored 23 points and Matt Waddell added 19 points to lead Purdue (8-3).

Weber State (5-5) took a 60-51 lead midway through the second half on two free throws by Ruben Nembhard, but Purdue answered with an 11-2 run to tie the game at 62-62 on a 3-pointer by Martin with 7:40 left in the game.

With the game tied at 66-66, Purdue went on an 8-2 run to lead 74-68 with 4:23 left and the Boilermakers pulled away from there.

"We played well for 30 minutes, then fall apart," said Weber State coach Ron Abegglen. "We've had that happen for the last four or five ball games."

Nembhard led Weber State with 23 points, while Kirk Smith added 14 and Jimmy DeGraffenried had 11 points.

Smith got into foul trouble and eventually fouled out.

"When Smith got into foul trouble, that really helped us," Keady said.