Ulster secured the Celtic League title with a last gasp win over the Ospreys thanks to a David Humphreys drop goal.
Ospreys (10) 17
Tries: Vaughton, Spice
Cons: Henson 2
Ulster (13) 19
Pen: Humphreys 3
Drop goals: Humphreys
The Irish province led 13-10 at the break, Matt McCullough scoring a try and David Humphreys kicking two penalties and a conversion.
Johnny Vaughton scored the Ospreys try which Gavin Henson converted.
Humphreys added a second half penalty and although Jason Spice scored a converted try, Humphreys kicked the winning points with a late drop goal.
Vaughton completed a fine Ospreys move to give last year's champions an early lead and Henson executed the conversion.
Humphreys' penalty reduced his side's deficit and when McCullough crashed over for a try which Humphreys converted soon after, Ulster led for the first time.
A further Humphreys penalty extended the lead but Henson pegged back the visitors with a penalty of his own before half-time.
Both sides made mistakes in the second half and the usually reliable Humphreys missed with two penalty attempts, one of which rebounded off the post from close range.
Jonathan Thomas was sin-binned for the Ospreys and the former Ireland fly-half slotted over the resultant penalty to give Ulster a 16-10 lead.
A Spice try, which was converted by Henson, edged the home side in front again but Humphreys redeemed himself by scoring the winning points two minutes from time with a long range drop goal which cannoned off both posts before going over.
Ulster coach Mark McCall:
"It was frustrating to be a point down late on but I knew if we could get back into their half, David Humphreys could do something like he did.
"I take my hat off to the players for the effort they have put in all season and for the defence they showed in this game.
"It is a privilege to be involved with them and they deserve to win this title.
"It tells you all you need to know about David Humphreys that he bounced back from a couple of kicks he would usually knock over to drop a goal like that to win the game."
Ospreys coach Lyn Jones:
"I'm disappointed with our performance. We turned a lot of ball over.
"There were a lot of poor things out there and we were off the mark a little bit. It's a disappointing way to finish the season having played so well over the past two or three months.
"Then again, Ulster defended very well and put their backsides on the line."
Ospreys: Gavin Henson; Jonathan Vaughton, Sonny Parker, Andrew Bishop, Shane Williams; Shaun Connor, Jason Spice; Paul James, Barry Williams (capt), Adam Jones, Alun Wyn Jones, Lyndon Bateman, James Bater, Jonathan Thomas, Lee Beach.
Replacements: Richard Hibbard, Duncan Jones, Andrew Millward, Andrew Newman, Richard Pugh, Matthew Jones, Stefan Terblanche.
Ulster: B Cunningham; T Bowe, A Trimble, P Wallace, A Maxwell; D Humphreys, I Boss; J Fitzpatrick, R Best, B Young, J Harrison, M McCullough, N Best, S Ferris, R Wilson.
Replacements: N Brady, R Moore, R Caldwell, N McMillan, K Campbell, J Bell, J Topping.
Referee: David Changleng (SRU).