IT took some doing, but Hibernian booked a Betfred Cup semi-final spot on Tuesday evening with a thrilling 3-2 win over Livingston.

The Championship side travelled to Easter Road looking for their first victory there since 2005, in what was also a repeat of the 2004 League Cup final when Livi were triumphant. 

History wouldn't repeat itself here, although David Hopkin's side looked like they could spring a surprise after going ahead twice in the first half through Alan Lithgow and Rafa De Vita.

Danny Swanson and Martin Boyle pegged the visitors back on both occasions, but it took a late penalty from Anthony Stokes to ensure the capital club will be in the hat for the last four draw later this week. 

Hibs started brightly, with Martin Boyle proving to be a particular menace to the visiting defence in the early stages, testing Neil Alexander from range and drawing a couple of excellent defensive blocks.

Anthony Stokes also had a header beaten away by Alexander as the pressure mounted, but it was the visitors who took a shock lead with their first chance of the game.

Raffaele De Vita drifted in a free-kick from the left-hand side and Hearts youth product Lithgow rose highest to nod it beyond young goalkeeper Ross Laidlaw.

The travelling support only had eight minutes to gloat though, as Danny Swanson swept in from the edge of the box to give his side a deserved leveller after 18 minutes.

Hibs were level, but the visitors began to grow into the game and again showed their clinical side when De Vita fired them back in front just before the half-hour mark. Efe Ambrose failed to clear the danger with his header and the Italian raced on to smash a half-volley off the crossbar and in from just inside the area.

The game took yet another turn on the half-hour mark when Boyle was sent rushing through on goal following a well-worked corner routine and the striker lashed a low finish into the bottom corner to make it 2-2.

Neil Lennon undoubtedly had some choice words for his players during the interval and the home side began the second half much as they had finished the first.

It wasn’t long before an opportunity presented itself, but Stokes’ header was too weak to trouble Alexander despite the striker finding himself in a completely unmarked position.

More chances came and went for the home side, with Stokes and Stephen Whittaker both going close, but it took until the 82nd minute for the decisive blow to be struck.

Paul Hanlon was tripped in the box and Stokes converted the resulting penalty superbly to put the Hibees in front for the first time in the match.