An injury-time goal from Aidomo Emakhu ensured that the Republic of Ireland Under-21s began their European Championship qualifying campaign with a 2-1 win over Turkey at Turner's Cross.
The hosts were trailing 2-1 with three minutes remaining when Zak Gilsenan equalised from the penalty spot.
His fellow substitute Emakhu then found the net after meeting a cross.
A Kenan Yildiz penalty had given Turkey the lead, Andrew Moran levelled, but Cihan Canak restored his side's lead.
The Irish started in the ascendancy but the visitors went in front in the 18th minute when Yildiz converted from the spot after Erencan Yardimci had been fouled.
Jim Crawford's side responded 11 minutes into the second half as Moran scored with a half-volley after Yildiz could only clear Sean Roughan's corner into his path on the edge of the area.
Canak turned in a cross in the 76th minute but the Republic responded again through Gilsenan's penalty following a foul on Moran.
Emakhu's winner six minutes into stoppage time sparked jubilation among the home team, with the joy tempered slightly by Roughan's subsequent dismissal amid the celebrations.
Turner's Cross, home of League of Ireland Premier Division side Cork City, was hosting a competitive international match for the first time in 14 years.
The Republic narrowly missed out on qualification for the last European Championships after losing out to Israel on penalties in a play-off.