Brechin sealed their place in the Ladbrokes Championship play-off final following a dramatic 4-3 penalty shootout win over Raith Rovers.
Graeme Smith was the hero for City with the goalkeeper making three penalty saves as the two sides could not be separated after the tie finished 4-4 on aggregate.
The semi-final was all-square following a 1-1 draw at Glebe Park on Wednesday evening and it remained a tight affair with the opening 45 minutes finishing goalless.
But, six minutes after the restart, Ross Caldwell put the visitors ahead with a neat finish but Jean-Yves M'voto equalised with a powerful header from Declan McManus' free-kick.
Alan Trouten looked to have sealed victory for Brechin six minutes from time but McManus popped up in stoppage time to level the scores and force extra-time.
Rovers took the lead for the first time in the match through Ryan Hardie in the 103rd minute but a wonderful 25-yard free-kick from Liam Watt with five minutes remaining made it 3-3 to force the tie to penalties.
The result relegates Raith and they will play in Ladbrokes League One next season with Brechin facing Alloa in the two-legged play-off final for a place in the Championship.
Championship News
Leon Balogun, Michael Oliseh, Mohammed Kudus headline Africans to watch in ESPN broadcast games
We name 15 African players who are shaping up to enjoy a big campaign in league competitions broadcast by ESPN in Africa.
Celtic 'disappointed' over Christie's ban for genital grab in derby
Celtic have said they are "extremely disappointed" about Ryan Christie's three-match ban for grabbing Rangers' Alfredo Morelos by the genitals.
Lottery winner completes Partick Thistle takeover
Lottery winner Colin Weir has completed his takeover of Scottish side Partick Thistle, saying he will hand over ownership to fans in 2020.
Transfer no-brainer: Willo Flood quits Dunfermline after 9 days for Bali move
You'd think Willo Flood would be grateful to Dunfermline for signing him as a free agent, but then Bali United came calling...
Dumbarton win play-off first leg against Alloa
Dumbarton to meet Alloa in play-off final