Stuart Findlay's stoppage-time winner against Connah's Quay Nomads in the Europa League first qualifying round first leg gave Angelo Alessio a winning start as Kilmarnock manager in Rhyl.
The Scottish Premiership side had the better chances at Belle Vue.
But a physical and determined Nomads side went ahead with 14 minutes left through Greg Taylor's own goal.
However, Eamonn Brophy levelled from the penalty spot before Findlay's injury-time winner.
Kilmarnock were playing in European competition for the first time since 2001 and found it hard to break down the hosts until the game entered the latter stages.
But they are now in a strong position before the second leg at Rugby Park on Thursday, 11 July to secure a tie against Partizan Belgrade.
'Nomads not overawed, but overcome'
Alessio, former assistant to Antonio Conte with Chelsea, Juventus and Italy, was in charge of his first competitive Kilmarnock game after succeeding new Scotland head coach Steve Clarke in June.
The Italian left his two new signings - goalkeeper Laurentiu Branescu and midfielder Mohamed el Makrini - on the bench while winger Dom Thomas started after spending last year on loan at Dumbarton.
Nomads, managed by Andy Morrison, had reached last season's Scottish Challenge Cup final, losing 3-1 to Ross County, and the Scottish boss said the Welsh Premier League runners-up did not fear Kilmarnock and would go "toe-to-toe with anyone".
The hosts showed from the start they were not overawed, although Kilmarnock started brightly and had the first attempt on goal with Thomas firing over from outside the box.
A good spell by Nomads saw them win a first corner of the game when former Cardiff City winger Chris Burke had to clear George Horan's header.
But the subsequent corner came to nothing and from the quick counter attack, Brophy's effort was blocked by Danny Holmes.
Kilmarnock, backed by a noisy travelling support of over 800 fans at Belle Vue, had a sustained spell of pressure which saw Brophy and Stephen O'Donnell shooting wide.
Nomads were holding firm and not giving their opponents any time on the ball while winger Michael Bakare, the Welsh Premier League's player of the season, began to make an impression towards the end of a goalless first half.
Kilmarnock showed their intent to break the deadlock after the interval and keeper Lewis Brass made a brilliant fingertip save to keep out O'Donnell's deflected effort.
Looking to find a breakthrough, El Makrini came on to make his Kilmarnock debut only days after arriving from Roda JC as Nomads continued to use their physicality to frustrate the visitors.
And Nomads stunned the Scottish side when they finally broke the deadlock on 76 minutes with Taylor conceding an own goal from Roberts' cross as he came under pressure from striker Michael Wilde.
But the hosts' lead lasted for all of seven minutes with Kilmarnock awarded a penalty after Burke was brought down by Roberts, Brophy striking it straight down the middle to equalise.
Kilmarnock went in search of a late winner and in stoppage time Findlay nodded home Burke's corner to complete the comeback.
Connah's Quay Nomads manager Andy Morrison told BBC Sport Wales: "We had to be brave and we were brave but right at the death, when we could have made better decisions with our clearances and showed some composure.
"I've got to try and pick the lads up and try and pick myself up, because it's devastating, with the last kick of the game, to lose.
"For the club and the league, to come away with a 1-1 would have been fantastic but it wasn't to be."
Connah's Quay Nomads
- 3RobertsBooked at 21mins
- 16OwenBooked at 60mins
- 9WildeBooked at 85mins
- 7McKenzieSubstituted forEl Makriniat 64'minutes
- 23ThomasSubstituted forKiltieat 78'minutes
- 15El Makrini
- Erik Lambrechts