Dave Andreychuk and Vincent Lecavalier each had a goal and an assist for the winners.
Allowing two goals or fewer in 12 of his last 13 games, Khabibulin turned aside 12 shots in the first period and 15 in the third to stretch his personal unbeaten streak to 13 games (11
Andreychuk converted on the power play early in the second period, reaching the 20-goal mark for the 18th time. Only Gordie Howe and Ron Francis have recorded more 20-goal seasons.
Fresh off his second career hat trick, Lecavalier netted a power-play goal and tied a career high with his 42nd assist on Andre Roy's tally.
Ruslan Fedotenko also scored for Tampa Bay, which improved to 4
Patrick Marleau notched his career-high 26th goal for the Sharks, who have lost four of their last five.
The Lightning moved five points ahead of second-place Washington in the Southeast Division while clinching their first postseason berth since 1995-96.