There were plenty of candidates for who the hero could have been at Hampden Park on May 21, 2016. Darren McGregor; the boyhood Hibs fan with his rags-to-riches footballing journey who had left Rangers as a free agent not even 12 months earlier? Lewis Stevenson; the quiet, unassuming steady Eddie who remains the only man in history to have won both the League Cup and Scottish Cup with Hibs? Paul Hanlon; another boyhood Hibee who had experienced more lows than highs but whose determination in injury time at Tynecastle a few months prior had helped Hibs get to this point? Anthony Stokes; the troubled striker who put in the performance of his life in the first 91 minutes of the final to fire Hibs ahead and then haul them back level with time running out?

Few would have earmarked David Gray, the captain, as the leading contender for Hampden heroics. The former Manchester United youngster had never scored a senior goal before arriving at Hibs in the summer of 2014, but he had opened his account in a 3-1 win against Rangers at Ibrox in September before notching his first goal at Easter Road against the Light Blues two days after Christmas in a 4-0 victory. 

And yet it was fitting that the man who led the club's revival as the first signing of the new regime led by Alan Stubbs, George Craig, and Leeann Dempster, should be the one to end this particular hoodoo. As captain he could always be counted on to give 100 per cent in every game. In three separate spells as interim manager he has navigated Hibs through three big events: avoiding being dragged into the relegation mire after stepping up following Shaun Maloney's dismissal, leading Hibs in the League Cup final against Celtic in the wake of Jack Ross' departure and attempting to restore some pride in the second leg of the Europa Conference League against Aston Villa. Big tests, but Gray was relied upon to steer Hibs through all three. 

His playing career somewhat fizzled out at Hibs as injuries caught up with him and he made the move into coaching but his enjoyment at once again rampaging up and down the Easter Road right flank was palpable on Sunday during his testimonial. Five of his team-mates from that day in May - Conrad Logan, Darren McGregor, Marvin Bartley, Fraser Fyvie, and James Keatings joined him on the pitch while another, Dylan McGeouch, was among those in attendance, as was coach John Doolan who helped mastermind the victory.

And just as Gray was relied upon so often during his playing career, and as he has been since he took up his coaching role, it was his effort that decided this encounter on a chilly day in Leith. One of his trademark runs into the box from right-back ended with a heroic sliding effort to divert Fyvie's cross past Paul Rachubka in the United goal. Was it planned? It's impossible to say. But the game needed something to liven it up and it was typical that Gray should be the man to seize the game by the scruff of its neck - even if his goal was more of a slide tackle than a well-taken strike, according to his uncharitable team-mates. 

There was also a chance for current manager Nick Montgomery to make his second appearance as a player at the stadium, nearly 20 years to the day after his first - for Scotland Under-21s against Croatia while Fyvie, Keatings, Grant Holt, and Steven Whittaker all came close to finding the net, with Montgomery nearly setting up Keatings for a late second as he rolled back the years with a fine defence-splitting pass. 

As far as football matches go the game had almost everything, including pantomime booing for former Hearts defender Adam Eckersley - his brief spell at Easter Road all but forgotten by those Hibs fans in attendance - the winner scored by the man of the moment, and even an unexpected cameo by United's manager for the day Brian McClair. But despite taking to the field looking like Gandalf with his long grey locks and wild beard, he was unable to sprinkle any magic to haul the visitors back into the game, and once the ninety minutes plus two extra - a nod to the timestamp of Gray's cup-winning goal - had been played, the curtain came down on a feel-good afternoon.

Speaking on the pitch at full time and flanked by wife Hayley and kids Ada, Ivy, and Archie the normally stoic Gray faltered as he thanked the fans, players, and testimonial committee for their efforts, and he admitted afterwards that he had felt a wave of emotion.

"I'm delighted and overwhelmed with the whole occasion. I'm so grateful to everyone who turned out in their numbers to support the event; I'm grateful to all the players, some of whom have travelled long distances to be here, and of course the people who pulled all this together," he said. "The testimonial committee has worked so hard and done an unbelievable job. It's been seamless for me - I've not had to do anything, so I'm delighted with everyone's efforts and really humbled by it all. It was emotional, especially at the end on the pitch. But I was also reminded why I retired; I felt absolutely shattered. I didn't quite enjoy that feeling with the lungs burning like they were!"

Gray's last appearance at Easter Road came at the tail-end of the Covid-19 season; captaining Hibs in a goalless draw with Celtic in what was also Scott Brown's final appearance for Celtic, with no supporters in the stadium. But he wasn't aware that it was to be his last outing as a player.  

"I didn't realise that was going to be my last game with the way things worked out, because I then moved into the coaching side of things with Jack Ross, so coming off the pitch that day, I didn't know that was going to be my last game," he revealed. 

"There wasn't a crowd in that day because it was the end of the Covid season so to get the opportunity to pull on this fantastic jersey for one last time and play on the pitch again was really enjoyable. I had my family here, and everyone who has supported me over the years, people who have travelled from down south to be here, and it really means the world to me. It's a moment that will live with me forever."

Asked if he had a message for the supporters he added: "I feel so lucky and privileged to work for such a fantastic club and to have done so for such a long time. I took the decision to come back up the road to join the club and from the minute I got here I've felt nothing but love and success.

"We've had some very good highs, some lows, but more importantly with what's going on in the world at the moment, not just in a football sense but generally, it's a very expensive time. It's a very expensive time to be a Hibs supporter with the semi-final of the League Cup coming up and travelling home and away in Europe so I'm so grateful to everyone who's supported this event and the ones who couldn't be here, I know that I have their support and I have done since the very beginning."