The Saints were second best for much of the game and a deflected goal in each half - the first coming from Alper Potuk with Veysel Sari adding the second - was enough for the hosts to take a decent lead back to McDiarmid Park for the second leg next week.
Brazilian Wagner scored a stoppage time goal as St Patrick's Athletic were held to a 1-1 draw against 10-man Bosnian outfit Siroki Brijeg.
The Dublin outfit, who beat IBV in Iceland in the last stage, made the perfect start in Pecara tonight when Christy Fagan opened the scoring in the 12th minute and their prospects of victory increased when defender Mladen Jurcevic was dismissed for a second bookable offence.
However, Wagner popped up in the third minute of added-on time to tie the scores and ensure there is everything to play for at Richmond Park next week.
Northern Irish outfit Portadown, meanwhile, look to be dead and buried in the competition after they were thumped 6-0 by NK Slaven Koprivnica of Croatia.
Nikola Rak scored a second-half hat-trick within the space of 24 minutes but the game had long ceased to be a contest before then.
Portadown were up against it from as early as the opening minute when Garry Breen put the ball into his own net before Tomislav Busic grabbed a brace with strikes in the 13th and 33rd minutes and Rak put his mark on proceedings with a superb treble after the interval to leave the visitors in complete disarray.
Sligo Rovers managed to keep their score respectable but they face an uphill climb next week after going down 3-1 at Spartak Trnava.
The Slovakian side were three goals to the good before the interval, with captain Miroslav Karhan opening the scoring in the 37th minute and Martin Mikovic grabbing a quickfire double shortly before half-time.
However, Gavin Peers then grabbed what could prove to be a vital consolation goal heading into the return clash at the Showgrounds in seven days' time.
Russian superpowers Anzhi Makhachkala edged past Hungarian side Honved, with Brazilian midfielder Jucilei grabbing the only goal of the game.
Vitesse Arnhem were involved in an eight-goal thriller with Lokomotiv Plovdiv, with an topsy-turvy encounter ending 4-4.
Another Dutch side in action on Thursday were Steve McClaren's FC Twente, and they were held to a 1-1 draw by Inter Turku on home soil.
Czech outfit Plzen saw off Rustavi 3-1, while Gent ended out Differdange 1-0.
Among the other notable scorelines on a busy night of second qualifying round action was APOEL's 2-0 victory over Senica.