Anthony Stokes scored twice for Hibs in a thrilling cup final at Hampden

A late David Gray header saw Hibernian beat Rangers to end a tortuous 114-year wait to lift the Scottish Cup.

Anthony Stokes scored twice for Hibs, either side of goals from Kenny Miller and Andy Halliday.

Then Gray headed in the winner before Hibs celebrated a timeless triumph.

Hibs fans spilled onto the pitch in their thousands after the final whistle, with some running towards the Rangers end, where pockets of supporters broke to confront them.

Players and match officials were caught up in the pitch invasion, which eventually saw mounted police enter the pitch.

Chief executive Stewart Regan said the Scottish Football Association was "appalled by the scenes of disorder and the contemptible behaviour" following the cup final.

Both sides had to leave the field, with Rangers given their medals in the dressing room and Hibs waiting for the pitch to be cleared before they could emerge to collect the trophy.

Police formed a cordon on the pitch

The Hibs players had began as though the manager's instructions were constantly ringing in their ears. The strategy was that the three centre-backs would stifle the corridors of space that Rangers look to exploit in attack, while heavy pressing would disrupt the rhythm of Mark Warburton's side.

The planning would have been meticulous, but an immediate advantage would not have been anticipated. There was a committed intent that enthused Hibs' play. It was evident in the way that Stokes clattered into Jason Holt in the first minute, but also in the way the striker drove into the Rangers penalty area before expertly placing a shot beyond Wes Foderingham.

Rangers' players were immediately subdued, although some might have been feeling an element of culpability. Halliday and James Tavernier had failed to win the ball from John McGinn, while Rob Kiernan allowed Stokes the time and space to measure his options.

Stokes naturally tends to drift out to the left, but the instinct would have been encouraged by Stubbs since the space between Tavernier and Kiernan is the most vulnerable area of the Rangers defence. Cummings and Stokes both made inroads, but the extent of Rangers' unease could be measured by the raggedness of their play.

David Gray (second right) heads a stoppage-time winner for Hibs

Passes went astray and possession was cheaply discarded, which would have infuriated Warburton when his entire philosophy is based on taking care of the ball. Resourcefulness can be prized, though, and it was a departure from their short passing game that brought Rangers level.

Foderingham's kick up field was won by Miller, allowing Barrie McKay to gather possession and carry the ball across the field. When he found Tavernier, the full-back immediately swept a cross into the box from deep, and Miller leapt ahead of the Hibs defender Darren McGregor to plant a header past Conrad Logan.

Flaws made the game exhilarating. The defending was so inept at times that opportunities were inevitable. Stokes sent an effort bouncing off the post, then Miller won another header inside the Hibs penalty area and his effort cannoned off the crossbar.

Stokes was irrepressible at times, at least when faced with Tavernier, who had little answer to the forward's runs. Stokes cut inside the full-back early in the second half, but his effort was pushed away by Foderingham. That was a feature of the rest of the game, but it was Rangers who dredged up the guile to take the lead.

Halliday was allowed the room to shape to shoot, around 25 yards out, but his effort was fierce, true and flew past Logan into the far side of the net. The onus, then, was on Hibs to respond, and the players found the means to regather themselves.

The introduction of Liam Henderson made an impact, not least because of his set-piece deliveries. From one, Stokes muscled Tavernier aside to head in at the near post. It was from another corner kick, again from Henderson, that Gray scored his historic, momentous goal, before surging off towards the fans to celebrate.