Haddington were so short of players they had three under-19s on the bench.
But they took the lead after 13 minutes. Striker Danny Simpson raced on to a through ball with his marker trailing behind. The keeper came out and all three collided and were tangled on the ground but Simpson was the first to recover and rolled the ball into the empty net.
Tranent equalised in the 72nd minute from a corner on the on the right when Dale Robert reacted quickest to slam the ball home. Then, in the last minute of regulation time, Tranent scored the winner. Alan Horne went on a mazy run from his own half beating players all the way through before sliding the ball into the net from ten yards.
Haddington struggled to field a side due to a long injury list and lost another three players during this run out.
Haddington: Johnston, Motion, Noble, Wilson, Daniel, Carter, Bracks. McEwan, Simpson, Campbell, Clark. Subs: Aitken, Hamilton, Bell, Hill.
Tranent: Bolowij, Barbariou, Baillie, Horne, Foster, Darling, Fearney, Berry, Sergeant, Lally, Robertson. Subs: Dick, Branley, Lawrie, Trialist, O Rourke.