Frank Lampard ignored the protests though and kept a cool head to fire England in front.
That prompted a better spell for England but Rooney missed a sitter from three yards and Steve Gerrard curled a good effort just wide.
England made a host of changes at half-time with Defoe replacing Emile Heskey, while James Milner came on for Gerrard, Aaron Lennon replaced Shaun Wright-Phillips and Michael Carrick took the place of Lampard.
And Defoe pushed his claims for a starting berth with another bright performance and on 63 minutes he doubled England's lead, taking Lennon's pass in his stride and lashing in a smart finish.
England took their foot off the pedal a little after that and Ljubijankic made them pay when he beat the England defence to head in a goal for Slovenia five minutes from time, but the home side hung on to clinch victory.