Ayr United staked their place in the play-off final but were made to fight all the way by a determined Brechin side who took a shock 2-1 lead early in the second-half.
However, United finished strongly and two goals in two minutes from Kenny Connolly and Chris Aitken steered them through 5-2 on aggregate.
Connolly for the suspended Ryan Stevenson was the only change from the team which won 2-0 at Glebe Park on Wednesday evening.
Ayr made a confident start as they chased the early goal which would surely put the tie to bed. And there were several near things before they struck in 15 minutes.
Neil McGowan beat Craig Nelson to get his head to an Aitken corner and Bryan Prunty knocked the ball home from close range.
Willie Easton then fired over while Nelson made good saves from Mark Roberts and Prunty.
However, it was Brechin who equalised against the run of play in 38 minutes when Rory McAllister sprinted clear to slide the ball past Stephen Grindlay.
There was a further shock for Ayr eight minutes after the interval when Brechin went ahead with a controversial penalty. Grindlay was ruled to have fouled Darren Smith inside the box with Ayr fans claiming a legal challenge had been made outside. After Grindlay was booked, McAllister fired home the penalty.
McAllister was only inches away from his hat-trick in 64 minutes when he chipped Grindlay who scrambled back to clear the ball off the line.
Only one goal ahead over the tie Ayr had to assert their authority once again.
Aitken, two goal hero from the first leg, had a thunderous shot tipped over by City 'keeper Nelson before Ayr equalised in 70 minutes, Connolly heading in at the back post from a Martyn Campbell cross.
The win was sealed 90 seconds later when Aitken sent a superb 25 yarder curling into the top corner for his third goal in two games.
Man of the match was Willie Easton but the disappointment of the day was a poor crowd of under 2,000.
Ayr United now await the delayed Airdrie United v Peterhead match which will be played this afternoon at New Broomfield Stadium with the Lanarkshire side leading by 2-0 from the firt leg.