Brechin City 1 Hamilton Academical 2
A goal two minutes into stoppage time from substitute Lee Hardy gave Hamilton all three points and broke the hearts of a gallant home side.
Hamilton were first to threaten after only five minutes when Brown Ferguson set up Brian Carrigan and he sent a shot wide on the turn.
Two minutes later Paddy Keogh headed wide from a Sandy Hodge cross.
Brechin hit back and after 11 minutes Scott Walker headed wide from an Ally Mitchell corner.
After 14 minutes a ball from Charlie King released Steven Hampshire and he drove a shot over.
It was Hamilton who opened the scoring after 19 minutes when John Robertson exchanged passes with Keogh and poked a shot into the net.
Brechin hit back, and after 32 minutes Hampshire had a shot saved and King put the rebound wide.
Just on the half time whistle Graham Gibson had a header deflected over the bar.
Brechin began the second half well, and Grant Johnson had a drive saved by keeper David McEwan.
Brechin equalised after 63 minutes when Johnson beat a defender and shot into the bottom corner.
Brechin looked for another goal, and King curled a shot just wide then McEwan made a fine save at the feet of King.
Having survived all that Brechin could throw at them, Hamilton snatched victory two minutes into stoppage time. Hardy controlled a crossfield ball, stepped inside David White and placed his shot wide of keeper Craig Nelson.