Hearts came from behind to beat FC Tallinn Infonet 2-1 in their Europa League first qualifying round clash at Tynecastle.
The Estonian side stunned the hosts as Jevgeni Harin scored a stunning volley after 21 minutes.
Prince Buaben levelled for Robbie Neilson's side from the penalty spot seven minutes later before Infonet captain Andrei Kalimullin scored an own goal in the 35th minute.
Hearts, who finished third in last season's Ladbrokes Premiership, will attempt to complete an aggregate victory when they travel to Tallinn for next Wednesday's second leg.
The Gorgie club will go into that match all the better for having 90 minutes of competitive action under their belts.
The visitors are already 17 games into their domestic season and Infonet made a bright start at Tynecastle.
Infonet, who are a point adrift of the summit in their league, created the first chance after nine minutes when Harin burst forward from midfield after Callum Paterson surrendered possession but the midfielder sliced a left-footed shot wide from the edge of the box.
Hearts defender John Souttar was then relieved he was not punished after he allowed a big kick to bounce inside the box.
Vladimir Voskoboinikov attempted to lob Jack Hamilton but his shot landed comfortably in the goalkeeper's arms.
Hearts went close in the 15th minute when Juanma got a glancing header on Paterson's cross but the ball drifted inches past the far post.
Infonet then silenced Tynecastle in the 21st minute with a stunning goal from Harin.
Dmitri Kruglov's cross from the left was volleyed into the net by the Harin from 12 yards.
Hearts were stunned but Neilson's side levelled seven minutes later with a penalty from Buaben.
The midfielder sent the keeper the wrong way from 12 yards after Vladimir Avilov was adjudged to have handled Juanma's pass.
Hearts then stormed ahead in the 35th minute with an own goal from Infonet skipper Kalimullin.
Paterson mishit Jamie Walker's corner back across with the goal gaping and the ball ricocheted off the defender and rolled into the net.
Before the half was out, new Hearts number one Hamilton was forced into action to push a fizzing Kruglov effort over his bar at full stretch.
Hearts enjoyed periods of territorial possession after the break but Infonet continued to look dangerous on the attack.
Hamilton repelled a stinging Aleksandr Volodin effort and were relieved to see Harin's deflected effort fly just over after the goal scorer found himself in space inside the area.
Hearts were then able to see the match out to pick up an important win to take to Estonia.