Robbie Neilson's last-gasp goal in Switzerland last night raised Hearts' hopes of remaining in the UEFA Cup.
They took the lead when Dennis Wyness grabbed his first European goal, but they thought they would have to settle for a point when Cesar Andres Carignano grabbed a late equaliser.
However, the match took a late twist when Neilson grabbed the winner with just one minute remaining.
But it was Basle who looked the stronger side in the early stages and only the goalkeeping skills of Craig Gordon prevented Hearts from falling behind in the 18th minute.
Matias Emilio Delgado tried his luck with a thunderous long-range effort that Gordon did well to block. Julio Hernan Rossi pounced on the rebound and tried to send his header past the Hearts goalkeeper from six yards, but Gordon was again on hand.
Hearts took the lead in the 31st minute. Ramon Pereira started the move when his pass found Hamill who set up Wyness for the shot from just outside the six-yard box and he left the Basle goalkeeper with no chance.
Gordon then pulled off another superb save. Sterjovski's cross found Chipperfield inside the six-yard box and his diving header looked certain to find the back of the net until Gordon sprang into action to deny the Australian.
Basle's luck deserted them again when Chipperfield's corner picked out Carignano and he watched in agony as Alan Maybury hooked his header off the line. But Carignano was celebrating after 76 minutes when he managed to shrug off Maybury before firing home.
Just when Hearts thought they would be forced to settle for a point, they left Basle reeling with a minute to go.
BASLE: Zuberbuhler, Zwyssig, Huggel, Sterjovski (David Degen 71), Chipperfield, Gimenez, Kleber, Delgado (Barberis 84), Philipp Degen, Smiljanic, Rossi (Carignano 62). Subs not used: Quennoz, Mandl. Booked: Gimenez. Goal: Carignano 76.
HEARTS: Gordon, Neilson, Pressley, Webster, Maybury, Hamill, Stewart (MacFarlane 69), McAllister, Wyness, de Vries (Weir 85), Pereira (Stamp 66). Subs not used: Moilanen, Janczyk, Sloan, Berra. Goals: Wyness 31, Neilson 89.
Referee: Kristinn Jakobsson (Iceland).