Allegri believes Milan "deserve to be in third place" and the win over Lazio could be decisive.
"It was positive that we kept a clean sheet at home after a long time, even if our opponents were down to 10 men," he said.
"It was necessary to win with a big margin because of the rule on head-to-heads being considered when teams finish level on points.
"The lads deserve to be in third place, as they are playing pretty well. We can be a little lazy at times, such as the Derby last week, so we must remember it takes focus to fight for third.
"We've got to concentrate on achieving this objective and next Friday we'll go into a very tough game away to Genoa.
"We're in good shape physically and I hope we can hold out like this to the end of the season. At the moment we are more balanced and organised, which makes it more likely we will win."