Hibernian survived a real scare at Cowdenbeath to progress to the fifth round of the Scottish Cup.
The Second Division leaders got off to a dream start, with Greg Stewart netting after just 19 seconds.
Leigh Griffiths equalised from long distance and Eoin Doyle shot the visitors in front on 27 minutes.
David Wotherspoon headed Hibs further ahead after the break, but the part-timers hit back and a John Robertson volley ensured a tense finale.
The home fans at the ramshackle Central Park were celebrating inside the first minute when Stewart dumped Sean O'Hanlon on his backside with a neat turn and lifted a cool finish beyond goalkeeper Mark Brown.
With Hibs on a miserable run of 10 games without a win, an upset looked a real possibility, but Pat Fenlon's men responded in style, only to buckle late in the game and almost throw it away.
A lovely dummy from Doyle presented Griffiths with a perfect chance to level, but the striker duffed his shot horribly wide in complete contrast to the composure shown by Stewart.
A terrible clearance from Hibs left-back Callum Booth landed at the feet of Scott Linton, but the Cowdenbeath midfielder's shot from the edge of the penalty box flew high over the crossbar.
Booth drilled a shot through a congested penalty area, only to see it whizz a yard wide.
O'Hanlon beat Cowden goalkeeper Thomas Flynn to a corner but could not divert the ball home with his head from close range.
The visitors were level on 18 minutes when Griffiths thumped in a stunning shot from 25 yards, with Cowdenbeath player-manager Colin Cameron guilty of giving the ball away in the move that led to the goal.
Doyle, making his first Hibs start, was lively and only the fingertips of Flynn denied the Irish striker after a cute dip of the shoulder on the edge of the penalty box.
However, the former Sligo Rovers star found the net on 27 minutes.
Michael Hart was given far too much time on the ball by a retreating Cowdenbeath defence and his pass found Doyle, who tucked in the rebound from a tight angle after his first effort was blocked by the foot of Flynn.
With Hibs well on top, Griffths rattled the crossbar with a dipping free kick from distance before John Armstrong made a goal-line block to keep out a head-flick from Doyle.
Hibs were caught napping by a long ball early in the second half, but Stewart, under pressure from the lunging Booth, could not apply a finishing touch.
The Scottish Premier League outfit moved further ahead soon after when Wotherspoon dived to meet a Danny Galbraith delivery and flicked a neat header in at the near post.
Griffiths saw a shot deflected wide, but the Second Division side were far from down and out.
Taking advantage of slack play from Galbraith, Armstrong flashed a great delivery across the face of goal with Stewart and Lewis Coult both inches away from making a connection.
Brown saved comfortably from a Mark Ramsay strike before Robertson narrowed the deficit with a sublime finish.
Running on to a high ball, the flame-haired midfielder flicked it over a static opponent with one touch and steered home a sweet volley with his next.
Former Hibs trainee Flynn made a strong save to keep out an angled drive from Booth, but Cowdenbeath were right back on the attack and Robertson squandered a great chance to level.
With the visitors defending nervously on the edge of their penalty area, the ball fell kindly for the midfielder, but he skewed a shot wide when face-to-face with Brown as the keeper kept guard on his near post.
The part-timers finished the game strongly, with Hibs in complete disarray, but could not find a way to force a replay.Continue reading the main story
Live Text Commentary
Full Time The referee blows his whistle to end the game.90:00 +2:05
Greg Stewart takes a shot. Paul Hanlon gets a block in. Outswinging corner taken right-footed by Mark Ramsay, save by Mark Brown.89:03
Ivan Sproule concedes a free kick for a foul on Jon Robertson. Jon Robertson fires a strike on goal direct from the free kick.88:21
Mark Ramsay sends in a cross.87:54
John Armstrong is ruled offside. Mark Brown takes the indirect free kick.85:28 Substitution
Substitution Akpo Sodje replaces Eoin Doyle.85:28
Sean O'Hanlon challenges Lewis Coult unfairly and gives away a free kick. Colin Cameron has a direct shot on goal from the free kick.85:13
The referee blows for offside. Thomas Flynn takes the indirect free kick.82:44
Paul Hanlon challenges Jon Robertson unfairly and gives away a free kick. David Cowan delivers the ball from the free kick right-footed from right channel, Mark Brown makes a save.81:22
The ball is delivered by Greg Stewart, blocked by Callum Booth. Outswinging corner taken by Mark Ramsay, David Wotherspoon manages to make a clearance. Corner taken right-footed by Mark Ramsay from the right by-line, save by Mark Brown.78:48 Substitution
Substitution Richie Towell is brought on as a substitute for Daniel Galbraith.78:48
Jon Robertson produces a right-footed shot from inside the area that goes over the bar.77:37
The ball is sent over by Callum Booth, Thomas Flynn makes a save. Michael Hart gives away a free kick for an unfair challenge on Mark Ramsay. Kenneth Adamson takes the direct free kick.76:17
Effort on goal by Jon Robertson from just outside the penalty area goes harmlessly over the target.71:26
A cross is delivered by Kenneth Adamson, save made by Mark Brown.70:13
Centre by David Cowan, blocked by Lewis Stevenson. Outswinging corner taken by Mark Ramsay, Michael Hart manages to make a clearance.68:42
Assist by Lewis Coult.68:42 Goal scored
Goal! - Jon Robertson - Cowdenb'th 2 - 3 Hibernian Jon Robertson finds the back of the net with a goal from deep inside the penalty box to the top left corner of the goal. Cowdenbeath 2-3 Hibernian.68:24
The referee blows for offside. Thomas Flynn takes the indirect free kick.67:53
Mark Ramsay takes a shot. Save made by Mark Brown.
Lewis Coult has an effort at goal from just outside the box which goes wide of the right-hand upright.66:38
John Armstrong crosses the ball, Effort from deep inside the area by Lewis Coult misses to the left of the goal.64:36
Leigh Griffiths challenges Marc McKenzie unfairly and gives away a free kick. Colin Cameron sends in a cross, Lewis Coult takes a shot. Save made by Mark Brown.61:41
Greg Stewart delivers the ball, clearance by Sean O'Hanlon. Corner taken right-footed by Mark Ramsay, save made by Mark Brown.60:29
Callum Booth sends in a cross, Joseph Mbu manages to make a clearance. Inswinging corner taken by David Wotherspoon from the left by-line, save made by Thomas Flynn.57:35
Leigh Griffiths takes a shot. John Armstrong gets a block in. Inswinging corner taken by David Wotherspoon from the left by-line, Colin Cameron makes a clearance. Ivan Sproule crosses the ball. Leigh Griffiths is ruled offside. Indirect free kick taken by Thomas Flynn.55:36 Substitution
Substitution (Cowdenbeath) makes a substitution, with Lewis Coult coming on for Scott Linton.53:22
Assist by Daniel Galbraith.53:22 Goal scored
Goal! - David Wotherspoon - Cowdenb'th 1 - 3 Hibernian David Wotherspoon grabs a headed goal from close in. Cowdenbeath 1-3 Hibernian.51:27
Free kick awarded for a foul by Sean O'Hanlon on Greg Stewart. Direct effort from the free kick comes in from Scott Linton, Ivan Sproule gets a block in. Daniel Galbraith crosses the ball,50:17
The ball is delivered by Michael Hart.49:09
The ball is crossed by Michael Hart, save by Thomas Flynn.48:29
David Cowan gives away a free kick for an unfair challenge on Daniel Galbraith. Free kick crossed right-footed by David Wotherspoon, Greg Stewart gets a block in.47:17
The ball is sent over by Ivan Sproule. The ball is delivered by Lewis Stevenson. The offside flag is raised against Leigh Griffiths. Thomas Flynn restarts play with the free kick.45:01
The referee gets the second half started.45:00 +0:14 Half time
Half Time The ref blows to end the first period.42:14
Daniel Galbraith delivers the ball from the free kick left-footed from right channel.42:14 Booking
Booking Scott Linton receives a yellow card.42:07
Scott Linton concedes a free kick for a foul on Ivan Sproule.39:33
Corner taken by Daniel Galbraith, clearance by David Cowan.36:32
Colin Cameron crosses the ball from the free kick right-footed from left channel, Michael Hart makes a clearance.36:32 Booking
Booking Lewis Stevenson is given a yellow card.36:08
David Wotherspoon takes a shot. Save made by Thomas Flynn. Free kick awarded for a foul by Lewis Stevenson on Mark Ramsay.34:30
The ball is sent over by Greg Stewart, blocked by Paul Hanlon. Corner taken left-footed by Scott Linton from the right by-line, Greg Stewart produces a right-footed shot from close in which goes wide of the right-hand upright.33:00
Inswinging corner taken right-footed by Daniel Galbraith, clearance by John Armstrong. Inswinging corner taken by Daniel Galbraith from the right by-line, clearance by Greg Stewart.30:40
David Wotherspoon challenges Kenneth Adamson unfairly and gives away a free kick. Free kick taken by Kenneth Adamson.30:11
Ivan Sproule produces a cross, clearance by John Armstrong.28:23
Foul by John Armstrong on Leigh Griffiths, free kick awarded. Leigh Griffiths produces a shot on goal direct from the free kick.26:51
The assist for the goal came from Michael Hart.26:51 Goal scored
Goal! - Eoin Doyle - Cowdenb'th 1 - 2 Hibernian Goal scored by Eoin Doyle from inside the six-yard box low into the middle of the goal. Cowdenbeath 1-2 Hibernian.26:07
Eoin Doyle takes a shot. Save made by Thomas Flynn.24:38
The ball is sent over by Daniel Galbraith.23:52
David Wotherspoon delivers the ball, save by Thomas Flynn.20:49
Ivan Sproule concedes a free kick for a foul on Jon Robertson. Joseph Mbu takes the free kick.19:04
Eoin Doyle takes a shot. Save made by Thomas Flynn.17:40
Assist by Lewis Stevenson.17:40 Goal scored
Goal! - Leigh Griffiths - Cowdenb'th 1 - 1 Hibernian Leigh Griffiths finds the back of the net with a goal from outside the area to the top left corner of the goal. Cowdenbeath 1-1 Hibernian.16:03
The official flags Callum Booth offside. David Cowan takes the indirect free kick.14:07
Inswinging corner taken by Daniel Galbraith from the right by-line, clearance made by John Armstrong. Corner taken right-footed by David Wotherspoon from the left by-line, Jon Robertson makes a clearance.13:33
Jon Robertson gives away a free kick for an unfair challenge on Daniel Galbraith. David Wotherspoon crosses the ball from the free kick right-footed from left channel, Kenneth Adamson manages to make a clearance.11:36
Callum Booth takes a shot. Blocked by John Armstrong. Inswinging corner taken left-footed by Daniel Galbraith, Scott Linton manages to make a clearance.10:06
The ball is delivered by Leigh Griffiths, Joseph Mbu gets a block in. Corner taken by Daniel Galbraith.9:10
Ivan Sproule fouled by Colin Cameron, the ref awards a free kick. Daniel Galbraith crosses the ball in from the free kick.7:39
Shot from deep inside the area by Scott Linton clears the crossbar.5:47
Unfair challenge on Colin Cameron by David Wotherspoon results in a free kick. Thomas Flynn takes the direct free kick.4:06
Handball by David Wotherspoon. Kenneth Adamson restarts play with the free kick.2:43
Shot from inside the six-yard box by Leigh Griffiths goes wide right of the goal.2:03
A cross is delivered by Leigh Griffiths, clearance by Paul Hanlon. David Wotherspoon takes a inswinging corner from the left by-line to the near post, clearance by Greg Stewart.0:12
The assist for the goal came from Colin Cameron.0:12 Goal scored
Goal! - Greg Stewart - Cowdenb'th 1 - 0 Hibernian Greg Stewart grabs a goal from inside the penalty box to the bottom right corner of the goal. Cowdenbeath 1-0 Hibernian.0:00
The match begins.
Live data and text provided by our data suppliers