Raith Rovers knocked top-flight Hibernian out of the Scottish Cup with victory at Easter Road.
Kevin Moon's early drive for the Championship side was cancelled out by an impressive Sam Stanton strike.
And Michael Nelson headed Hibs level a second time after Dougie Hill had volleyed Raith into the lead again.
But Grant Anderson headed past Ben Williams midway through the second half and the Fife side's third goal proved to be the winner.
Grant Murray's side, who had not scored a goal in 2014 prior to their visit to Leith, enter Sunday's quarter-final draw while Hibs will only have league football to contend with for the rest of the season.
Hibs were first to threaten as James Collins turned the ball towards goal from the six-yard line but Ross Laidlaw made an excellent block.
But his opposite number Ben Williams was left helpless as Moon lashed home after Joe Cardle's cross was deflected into his path.
The loss of the goal demanded a response from the hosts and it came in the form of Stanton's 20-yard drive, which found the net via Laidlaw's left-hand post.
Anderson celebrates his winning goal with Callachan
Those early goals made for an open first half and Ross Callachan came very close to regaining the lead for the visitors, his shot from outside the box touched onto the post by Williams.
The Kirkcaldy side were forced into a change when Reece Donaldson was stretchered off following an accidental clash of heads with Jordon Forster. Former Hibs defender Fraser Mullen came on.
But it did not upset Raith's rhythm and Hill steered the ball home on the volley after Anderson had headed on a free-kick.
Once again the lead did not last long with Nelson's commanding header converting Liam Craig's corner.
Being pegged back a second time did little to dampen Raith's enthusiasm and Moon tested Williams with a fierce drive early in the second half.
And, just after Hibs duo Danny Haynes and Abdellah Zoubir had come on for Collins and Alex Harris, the hosts found themselves behind a third time.
Cardle launched a cross into the box from the left-hand side and Anderson's backwards header completely caught out Williams.
An onslaught towards the Raith goal ensued with Nelson twice coming close with headers - one of which struck the crossbar - and Laidlaw beating away a powerful Liam Craig free-kick.
At the other end, substitute David Smith beat Williams to a long ball and nudged the ball towards goal but Paul Hanlon was back in good time to clear.
Laidlaw denied Haynes as stoppage time approached and a late flurry of corners could not create the create the leveller Hibs craved.
Hibernian manager Terry Butcher:
"We deserved nothing and I wouldn't take anything away from Raith Rovers.
"They rubbished our back four and passed it well. We came back twice but couldn't come back the third time.
"Quite rightly our supporters were booing our players at the end because that performance is totally unacceptable and the players have been told that.
"It's baffling to know where it came from because training has been bright.
"We played well against Celtic two weeks ago and with only two changes in the team today I was expecting more of the same but Raith Rovers stopped us from playing, we couldn't break them down and now we're out.
"We talked about taking steps forward but we haven't taken any steps forward today.
"Sam Stanton was good today and Duncan Watmore was like a breath of fresh air out on the right. He ran out of steam at the end.
"By any stretch of the imagination we were second best to everything today and we deserve to be out of the Cup.
"Hibs fans put a lot of stock in the Cup and we do as well. We are just bitterly disappointed that we haven't performed anything near what we can do.
"It is a big job. We will keep working away and make sure we do the right things."
Raith Rovers manager Grant Murray:
"I'm delighted for the players. We had to stand up and be counted today.
"To come here and score three goals and put Hibs out of the Scottish Cup is a great feeling.
"We knew Hibs would put us under pressure but we felt if we were confident enough and moved the ball about we would be a threat as well.
"When you get to half-time and you've scored two goals at a place like this against a very good Hibs team, you have to have belief.
"We had to make changes. Three of the back four had to be re-shuffled.
"I'm ecstatic. Everyone put a shift in. Scoring goals gave us a massive lift."
- 01 Williams
- 23 Forster
- 16 Stevenson
- 20 Taiwo Booked (Heffernan - 71' )
- 05 Nelson
- 04 Hanlon
- 22 Watmore
- 10 Craig
- 14 Collins (Zoubir - 61' )
- 26 Stanton
- 07 Harris (Haynes - 61' )
- 08 Robertson
- 15 Boateng
- 18 Maybury
- 24 Heffernan
- 27 Zoubir
- 31 Grant
- 33 Haynes
- 17 Laidlaw
- 02 Thomson
- 03 Booth Booked
- 12 Callachan Booked
- 05 Hill (Ellis - 73' )
- 14 Donaldson (Mullen - 41' )
- 11 Anderson
- 06 Fox Booked
- 09 Spence Booked (Smith - 64' )
- 08 Moon
- 07 Cardle
- 15 Smith
- 16 Ellis
- 19 Mullen
- 21 Vaughan
- 23 Matthews
- 26 Bates
- 27 Roberts
Ref: Steven McLean