Almost 30 years to the day Dundee United met St Mirren in the Scottish Cup final, the pair meet again in similar, but also vastly different circumstances.

The two Championship teams go head to head in Saturday's Challenge Cup final at Fir Park - both vying for silverware, but both also starkly aware of the heights they've fallen from.

When Jim McLean took his Dundee United side to Hampden in the 1987 Scottish Cup final they were on the verge of the biggest week in the club's history.

They were four days away from the second leg of the UEFA Cup final with IFK Goteborg at the end of a mammoth campaign that had seen them play 67 matches, finish third in the top flight and beat Barcelona en route to the final.

The Buddies too were looking to put a gloss on a season in which they secured top-flight football for a tenth successive season with a respectable seventh place league finish.

In front of a raucous, 50,000-strong Hampden crowd, the two sides put on a classic cup final settled by an Ian Ferguson strike in extra time to prolong United's club hoodoo for another year.

But 30 years later, as the two prepare to lock horns in the final of another cup competition this weekend, the circumstances surrounding it could not be more different.

The pair have swapped the grandeur of Hampden for Fir Park, the Scottish Cup for the Challenge Cup and instead of the post-match glamour of Gothenburg, Dundee United's midweek fixture is against struggling Ayr United.

Saturday's match does have its charm though. Saints have improved vastly from their dismal early season form. Jack Ross has been able to reshape a disjointed squad left behind by Alex Rae. United boss Ray McKinnon meanwhile may see it as welcome relief from their torrid league form.

However it is telling of the current competitiveness of Scottish football that two of its most historic clubs have tumbled so far down the league pyramid.

Four years ago, the Buddies defeated Hearts at Hampden to get their hands on the League Cup after dumping out Celtic in the semis. Three years earlier United had tasted Scottish Cup glory with a 3-0 win over Ross County.

But the fortunes of both clubs have been catastrophic since then.

The Paisley club barely put up a fight against relegation from the Premiership in 2015 and finished a full 20 points off the Championship play-off places last season. A horrendous start to the current campaign then saw them go 14 league games without a win, leaving them rooted to the bottom of the table in December with just four points.

Arguably though, for United, the past few years have been even worse.

The flourishing crop of younger players who made the Tannadice club one of the most exciting sides in the country to watch have all moved on and replacing them has proven to be a near-impossible task.

The downward spiral saw them fall from the top of the league in November 2014 to the very bottom less than a year later - a position they were unable to move from.

Ongoing unrest continues to see supporters call for chairman Stephen Thompson to resign with yet another display from the stands unveiling a 'Thompson out' banner during their defeat to Hibs earlier this month.

While they have both suffered momentous falls from the top of Scottish football, they do differ in terms of recent form.

New boss Ray McKinnon was expected to have the Terrors mounting a serious assault on the Championship title in his first season in charge. But they're now 11 points behind league leaders Hibs with eight games left to play and have registered just two wins since the turn of the year.

By contrast, Saints have clawed their way back from a seemingly inevitable slide into the third tier.

Having spent the season adrift at the bottom of the Championship, they've managed to pick up six wins in their last nine fixtures, pulling them to within a point of ninth-placed Ayr United.

But while their league form has picked up of late it's their cup runs that have particularly warmed the fans to their new manager.

The Buddies have won more games in cup competitions this season (10) than they have in league action (six) and earned high praise from Celtic manager Brendan Rodgers for their performance in the 4-1 defeat at Celtic Park in the Scottish Cup quarter final.

"They are the best team that we have played domestically, including Premiership teams, without any shadow of a doubt," Rodgers said after the game. "How they are at the bottom of the league I do not know. They are a very good side."

A victory at Fir Park for either side would bring silverware on a smaller scale. But it could also be the first stop on the road back from a dramatic fall from grace.