Hearts U20s lost 2-1 to Rangers in Monday night's Development League match at Forthbank.
A young Hearts team featured just one first team player in the starting eleven as Moha Choulay lined up on the wing.
After a goalless first half, Rangers opened the scoring courtesy of a Serge Atakayi strike. The Wee Jambos, however, looked to have sealed a share of the spoils when Lewis Moore equalised on 80 minutes.
The hosts then grabbed a late winner in controversial circumstances. On 85 minutes, Atakayi hit a shot that Kelby Mason touched onto the post before clawing the rebound clear. The assistant referee judged the ball to have crossed the line, however, and the late goal proved decisive.
Hearts: Mason, Brandon, Petkov (K.Smith 46), Jones, Reid, Choulay (Morrison 59), Paton, Beith, Moore, Roy (Currie 59), Henderson. Subs not used: Gallacher, Leonard, Cochrane, Akers.