Dundalk must travel to Poland next week knowing they need to score at least two goals if they are to try and achieve their dream of reaching the group stages of this season's Champions League.
Polish side Legia Warsaw grabbed a vital away goal thanks to the conversion of a somewhat harshly awarded penalty ten minutes ito the second half in Wednesday night's UEFA Champions League play-off game in the Dublin Stadium and then a late strike in added time.
A huge travelling contingent from Dundalk turned up at the Dublin venue to see their side play with real purpose and desire during an impressive first half performance.
However the Polish champions held firm and never looked under any real pressure throughout that first 45 minutes.
The second half saw Legia come into the game more and when Nikolic rounded Lilywhites keeper Gary Rogers in the 55th minute his cut back to Langil saw the Legia attacker strike the ball goalwards, however Andy Boyle was adjudged to have blocked the ball with his arm and a penalty was awarded.
Nikolic duly converted the resulting spotkick to give Legia a vital 1-0 lead.
Dundalk appeared rocked by that goal and struggled to regain their composure.
The Polish outfit tested Rogers once again in the 67th minute, but the stopper managed to parry Nikolic's shot away to safety.
Stephen Kenny's outift did settle as the final quarter of an hour dawned and there were big shouts for a penalty when Kilduff appeared to be bundled over in the 80th minute, but it was waved away much to the ire of Lilywhite fans.
With two minutes left Ronan Finn flashed a shot over Legia's bar as Dundalk pushed for a goal.
Legia wrapped the game up with a late goal from Prijovic in added time.
In the end Dundalk were unable to grab that illusive goal to bring with them to Warsaw next week.
Dundalk will also have to do without the services of their influential skipper Stephen O'Donnell following a booking in Wednesday Night's clash.
Dundalk FC: Rogers, Gannon, Barrett, Boyle, Massey; Mountney, Shields, O'Donnell, Horgan; McEleney; McMillan.
Legia Warsaw: Malarz, Pazdan, Jodlowiec, Lewczuk, Langil, Odjidja, Nikolic, Hlousek, Kucharczyk, Broz, Moulin.