The goal was attributed to him but the match officials decided it was diverted past Michael Agazzi by Cagliari defender Michele Canini - a theory backed up by television replays, although it was difficult to tell who really scored.
The Nerazzurri rested Wesley Sneijder and Lucio and they stuttered through the game but the manner of victory will be unimportant given their achievements under new coach Leonardo - at the depth of their despair under Rafael Benitez, Inter were 13 points behind the Rossoneri but now have every chance of retaining their title.
Inter must now prepare for their Champions League last-16 tie with German giants Bayern Munich, who they beat in last year's final.
An open half started in entertaining fashion as chances were traded at will, both keepers forced into action in a frantic first five minutes.
Inter took the lead seven minutes in when a clever free-kick from Samuel Eto’o released Pandev, whose shot was saved by Agazzi only for Kharja to drill those loose ball into the back of the net.
The Moroccan’s finish took a deflection en route to goal and Cagliari felt aggrieved - it seemed the last touch was off Ranocchia, who was in an offside position, although the officials decided that Canini was responsible.
Pandev was causing all kinds of problems from deep and he released Eto’o who was denied by a Francesco Pisano block, while the Cameroon striker spurned a good chance laid on by Maicon when he scuffed a finish low into Agazzi’s arms.
And at the end of the first half the Japan left-back made a superb last-ditch challenge to prevent Roberto Acquafresca from finishing off Lazzari’s excellent low ball, timely as it was well executed.
Cagliari begun the second half in similar fashion, Lazzari spanking a half-volley just wide, while Acquafresca met Daniele Conti’s wicked low cross but was denied by Ivan Cordoba.
Conti almost scored himself, his long-range shot taking a wicked deflection off Thiago Motta but dropping just wide, while Lazzari had a similar effort diverted past the post.
Cagliari suddenly tired though and the last 20 minutes were a painful grind for both sides as Inter killed the game and closed out the kind of win that results in titles.