Peter Thompson pounced in injury time to seal a stunning Big Two victory at the Oval last night.
Thompson headed past Elliott Morris in the 92nd minute to earn Linfield a place in the semi-finals of the County Antrim Shield.
The striker’s neat finish came less than a minute after Glentoran defender Jimmy Callacher had levelled the scores.
Brian McCaul had given Linfield a 1-0 lead on the night with a close-range shot in the 24th minute, only for Jim O’Hanlon to equalise 10 minutes later.
Former Glens midfielder Daryl Fordyce then edged the Blues in front in the 83rd minute, but a dramatic exchange of goals in injury time finally saw David Jeffrey’s side prevail.
For Glentoran it was a first defeat in 11 outings this season, and their first derby reverse in six.
It was the Glens who started brightly, forcing no less than seven corners inside the opening 15 minutes.
Jay Magee could only blast a first time effort well over the bar in the third minute.
Magee then attempted a curling effort from distance that never threatened Blayney’s goal in the 16th minute, while two minutes later Despite their early pressure it was Linfield who broke the deadlock in the 24th minute.
Jamie Mulgrew was the provider, the midfielder’s low cross from the right being forced home by McCaul at the back post.
The Glens were rewarded for their endeavour with an equaliser on 34 minutes.
Jason Hill started a rapier counter attack with a surging run through the midfield before feeding Sean Ward on the right.
And when Ward crossed to the middle O’Hanlon was on hand to slot home with Blayney stranded.
The Glens finished the half strongly with Andy Waterworth - who was proving a livewire threat - forcing Blayney into a fingertip save two minutes before the break.
Linfield almost regained the lead nine minutes after the restart, but William Murphy’s header from Quinn’s corner was cleared off the line by Stephen McAlorum.
Murphy then almost deflected Clarke’s corner into his own net as the Glens attempted to find a winner in 90 minutes.
The home crowd was stunned into silence seven minutes from time when Fordyce found the net.
Substitute Michael Carvill threaded a through ball for Thompson to chase, and when the striker challenged the onrushing Morris the ball fell to Fordyce who slotted home.
The home side looked to have sent the game into extra time with Callacher bagging an equaliser in the 91st minute.
Howland delivered the free-kick which Callacher glanced into the far corner with a deft header.
But less than a minute later Linfield somehow claimed a dramatic winner.
Jim Ervin found space on the right to cross to the unmarked Thompson who ghosted in at the near post to head past Morris.
There was still time for Waterworth to find the back of the net, only to be ruled out for offside.
The Blues join Ballymena United, Donegal Celtic and Crusaders in the semi-final draw.
GLENTORAN: Morris, Kane (Elliott 87), Clarke, Magee, Ward, Howland, Waterworth, Hill (Murray 87), McAlorum (McGuigan 87), Callacher, O’Hanlon.
Subs not used: Nixon, Hogg.
LINFIELD: Blayney, Gault (Gault 87), Murphy, Thompson, Burns, Fordyce, Ervin, Mulgrew, Watson, McCaul (Carvill 69), Quinn.
Subs not used: Armstrong, Henderson, Browne.
Referee: Raymond Crangle (Belfast).