Wayne Rooney
Rooney scored with four minutes left to get England out of jail. Getty Images

Wayne Rooney went within one goal of equalling the all-time England goalscoring record as the Manchester United striker scored late to help Roy Hodgson's side maintain their 100% record in European Championship qualifying with victory over Slovenia in Ljubljana.

Milivoje Novakovic had put the home side ahead at the break but Jack Wilshere scored his first internationals from range to seemingly put the visitors on course for a sixth straight win.

Nejc Pecnik connected with Bojan Jokić whipped cross to equalise but Rooney responded straight way after being inadvertently put clean through to claim the points with four minutes remaining and go level with Gary Lineker on 48 England goals, one behind Sir Bobby Charlton.

Victory sees England pull nine points clear of second place Slovenia in Group E and though that advantage could be cut by Switzerland should they beat Lithuania in the later qualifier, they are within touching distance of another major finals appearance.

But serious questions remain over their progression under Hodgson, despite going an 11th game unbeaten since the World Cup - their best run since 1996 - after a 90 minutes in which they often looked second best against a nation ranked 48th in Fifa's world rankings.

Following an insipid draw with the Republic of Ireland the previous weekend, Hodgson made three changes with Kieran Gibbs, Fabian Delph and Andros Townsend all earning recalls.

Slovenia may not have had the luxury of options plucked from one of Europe's top divisions but they named a team bolstered by Inter Milan goalkeeper Samir Handanovic, while Fiorentina's Josip Ilicic retained his place.

A heavy victory over San Marino in March had ensured Srecko Katanec's team had kept to within touching distance of England, who were looking to put themselves out of sight in Group E and complete an international season unbeaten.

And in the opening quarter of the game the visitors twice came within inches of tightening their grip on qualification for Euro 2016 but Raheem Sterling's radar was slightly askew on both occasions.

As the hosts were failing to establish a foothold in the game, England continued to pose a threat on the break and Handanovic had to be at his very best to deny Rooney, turning the skipper's effort behind.

But despite controlling the game England were made to pay for failing to take their chances as Novakovic sprung the offside trap and slid past the onrushing Joe Hart with seven minutes of the first half remaining.

The 36-year-old's 30th international goal exposed a hesitant England back-line and at the break left Hodgson contemplating his side's first defeat of the qualifying campaign.

Adam Lallana was introduced at half-time and it took 12 minutes for the Liverpool attacker to make an impression as he helped find Wilshere, who smashed in his first international goal from range to draw England level.

Rooney should twice have put the visitors ahead but missed the target on both occasions from six yards out however with a quarter of an hour remaining Wilshere struck again from range, with a stunning hit which flew into the roof of the net.

England looked on course to saunter to victory but they were pegged back with six minutes left when Pecnik outjumped Gibbs at the back post to power a header past Hart, but Rooney came to their rescue with a calm finish past Handanovic to mask over the cracks.