Cannot play media. Sorry, this media is not available in your territory.
Highlights: Ospreys 24-23 Harlequins
Ospreys (14) 24
Tries: S Williams, Bowe Con: Hook Pens: Hook 4
Harlequins (3) 23
Tries: Barry, Fuga Cons: Luveniyali 2 Pens: Luveniyali 3
Tommy Bowe is congratulated after his last-gasp try for the Ospreys
Defending EDF Cup champions Ospreys escaped a shock home defeat to Harlequins thanks to a late Tommy Bowe try and James Hook's cool conversion.
Ospreys led 14-3 at the break with a Shane Williams try and Hook's boot, but Quins hit back in the second half.
Fine handling skills created tries for De Wet Barry and Tani Fuga, and Quins led 23-17 with two minutes remaining.
In a dramatic finale, Lee Byrne's break and chip allowed Bowe to touch down and Hook held his nerve to claim the win.
Harlequins director of rugby Dean Richards opted to start with a second-string XV, only flanker Chris Robshaw surviving from the starting side that won at Worcester on Thursday night in the Guinness Premiership.
In contrast the Ospreys had enjoyed an easy win over Ulster last Saturday in the Magners League and were able to field a side close to full strength.
The Welsh hosts were also boosted by the return of Gavin Henson, the Wales and Lions centre making his first start since a serious ankle injury last April.
Ospreys applied early pressure with a kick into the right corner for Shane Williams to chase.
In all honesty Quins probably deserved to win on that second-half performance
Quins full-back Tom Williams did well to beat his namesake to the ball, but then had his clearing kick charged down and only a desperate scramble prevented a try.
The hosts continued to exert pressure on Quins but a string of clumsy penalties, with back-row Ryan Jones twice culpable, prevented any momentum being built.
Hook at last got the scoreboard moving with a penalty in the 13th minute, while soon after Ospreys prop Adam Jones and Quins lock James Percival did their bit for Anglo-Welsh relations with some fisticuffs on the deck.
Wales fly-half Hook missed his next kick at the posts but made amends with his next effort to put the Ospreys 6-0 ahead after 23 minutes.
Quins at last managed to keep possession for a spell and some meaningful drives by the pack, with number eight Phil Davies leading the way, saw them enter the Ospreys' 22.
Hooker Tani Fuga picked a good angle to breach the first line of defence and the Ospreys gave up a penalty as they scrambled to plug the hole, Waisea Luveniyali kicking the English side's first points.
A third Hook penalty restored Ospreys' six-point lead before wing Williams put daylight between the sides with a try as half-time approached.
An inside ball from Hook allowed Alun Wyn Jones to burst through a gap close to a ruck and the lock spun a superb long pass off his left hand.
Henson provided the link, drawing two defenders and shifting the ball right again for Williams to race away to the line for an unconverted try.
Quins ended the half with 14 men after wing Epi Taione launched a flying shoulder-charge at Hook.
The visitors made light of their man disadvantage as they roared out after the break, stretching Ospreys one way then the other before Tosh Masson sent Barry over with an inside pass.
Luveniyali converted the South African's try from under the posts to cut the deficit to 14-10.
Suddenly all the momentum was with Quins and the Ospreys were creaking as they tried to contain waves of attackers.
It took a head-on try-line tackle by Richard Hibbard to prevent Barry claiming his second try, but Quins recycled and Fuga burrowed over - the video referee confirming the score.
Luveniyali stroked over the conversion and then added a long penalty to put Quins into a 20-14 lead with an hour on the clock.
Hook stemmed the tide with his fourth kick of the afternoon, but immediately Ryan Jones was sent to the sin bin for not releasing in the tackle and Luveniyali restored Quins' lead from the resulting penalty.
Shane Williams nearly claimed a breakaway Ospreys try when the wing took a quick tap-penalty and then chipped ahead.
Defending full-back Tom Williams won the chase and although Quins then conceded a penalty, preventing the quick line-out, Hook missed the relatively simple kick.
With time running out, full-back Byrne blasted through the Quins line and chipped ahead into the corner.
Johnny Vaughton just failed to gather, but as the loose ball bounced over the line Bowe was sharpest and got the touchdown.
The conversion was still needed to claim the victory but Hook held his nerve for the narrowest of wins, although Harlequins have the small consolation of a losing bonus point.
Ospreys lock Ian Gough:
"It was a difficult first half but we got some points on the board.
"After the break they came on very strong and we'll have to analyse that to see where we went wrong.
"In all honesty they probably deserved to win on that second-half performance.
"But it's a cup competition, we dug deep and got the all-important victory."
Harlequins director of rugby Dean Richards:
"The boys are very disappointed.
"We didn't have a good first half - we showed the Ospreys too much respect - but then we took it to them in the second.
"We have a lot of ability across the board in our squad and we don't have a second team as such. We had five internationals out there.
"We got ourselves into a position whereby we could, and should, have won the game."
Ospreys: Byrne; Vaughton, Parker, Henson, Williams; Hook, Webb; D Jones, H Bennett, A Jones, Gough, Wyn Jones, Tiatia, Holah, R Jones (capt).
Replacements: Bowe for Parker (41), Biggar for Webb (63), Hibbard for Bennett (51), Bateman for Gough (72), T. Smith for Tiatia (63). Not Used: Millward, Tandy.
Sin Bin: R. Jones (64).
Harlequins: T Williams; Taione, Barry, Masson, Amesbury; Luveniyali, Gomarsall (capt); Croall, Fuga, Lambert, Percival, Robson, Robshaw, McMillan, Davies.
Replacements: Guest for Mcmillan (24). Not Used: Frazier, Elosu, Kohn, G. Williams, Jewell, Stegmann.
Sin Bin: Taione (38).
Referee: Tim Wigglesworth (RFU)