England looked set to lose their first qualifying game since 2009 when Milivoje Novakovic put Slovenia ahead, but Jack Wilshere scored two fine goals to put the visitors in front.
Substitute Nejc Pecnik thought he had grabbed a historic equaliser with six minutes to go, but less than two minutes later, Rooney capitalised on a defensive error and slotted past Samir Handanovic to score his 48th international goal.
Switzerland moved up to second in the group as they claimed a 2-1 comeback victory over Lithuania at Zalgiris Stadium.
Fedor Cernych handed the hosts a shock lead against the run of play midway through the second half, but Josip Drmic netted an equaliser five minutes later before Xherdan Shaqiri fired home a late winner to extend their unbeaten run to seven matches.
David Silva scored the only goal as Spain claimed a 1-0 win over Belarus in Group C.
The Manchester City midfielder hit the target on the stroke of half-time to keep Spain in second place behind Slovakia, who beat 10-man Macedonia 2-1 thanks to goals from Kornel Salata and Marek Hamsi.
Arijan Ademi scored a consolation effort in the second half before Macedonia were forced to finish the game with 10 men after Ferhan Hasani was dismissed for his second bookable offence.
Ukraine kept the pressure on the top two in Group C with a comfortable 3-0 victory from a dominant performance against Luxembourg in their clash at Arena Lviv on Sunday.
The home side began to apply the pressure early on but it took three second-half goals – from Artem Kravets, Denys Garmash and Yevhen Konoplyanka – to seal all three points to extend their unbeaten run to three matches.
Marc Janko scored a spectacular goal as Austria claimed a 1-0 win over Russia to maintain their grip at the top of the Group G standings in Sunday’s Euro 2016 qualifier in Moscow.
Russia were guilty of not clearing the ball from their penalty area and Janko capitalised with an overhead effort to beat goalkeeper Igor Akinfeev from close range in the first half.
It meant Austria made it five wins and a draw in their qualifying campaign and kept them four points ahead of Sweden, who won their match against Montengro 3-1 at the Friends Arena in Solna.
Zlatan Ibrahimovic scored twice just before half-time after Marcus Berg headed the hosts ahead, with Dejan Damjanovic’s second half penalty for Montenegro not enough to affect the outcome.
Estonia kept alive slim hopes of forcing their way into contention for a play-off place in Group E with a 2-0 Euro 2016 qualifying win over San Marino in Tallinn.
Sergei Zenjov netted a brace on his 100th appearance as Estonia moved up into fourth, just two points behind Slovenia, beaten at home by group leaders England, and Switzerland, who have played a match less.
Moldova picked up only the second point of their Euro 2016 qualifying campaign as they held Liechtenstein to a 1-1 draw in Vaduz.
The home side took the lead through Sandro Wieser’s stunning opener before Gheorghe Boghiu equalised.