Connacht's Matt Mostyn is tackled by Sonny Parker
Connacht 15 (3)
Pens: McHugh 5
Ospreys 10 (10)
Mark McHugh was the Connacht hero on Friday night as he booted four second-half penalties to send the Irish side top of the Magners League table.
McHugh kicked five penalties in all at the Sportsground as the Ospreys fell away after leading 10-3 at half-time.
It was McHugh's loose grubber kick that former All Black Justin Marshall collected on the way to scoring the game's only try, just before the break.
James Hook added the conversion after earlier scoring a penalty.
Connacht's superb fighting spirit, typified by their grizzled pack, saw them deservedly come from behind for their first win in four meetings with the Welsh region.
The Ospreys, starting with 15 internationals, were marginally the better side during a dull first half.
Into the wind, McHugh chipped over his first penalty from 32 metres to hand Connacht a ninth-minute lead.
Marshall drove his troops on and young fly-half James Hook took the second of two penalty opportunities to draw level by the 29th minute.
The Connacht pack, which had Ospreys tight-head Adam Jones under a good deal of pressure in the scrum, carved open a late chance.
However, McHugh took the wrong option from second phase ball and his kick was gobbled up by Marshall and the 33-year-old scrum-half showed a great turn of pace to race virtually the length of the field and score in the right corner.
Hook added the conversion for a seven-point Ospreys lead.
Yet with revenge for last season's 44-16 defeat at the same venue clearly on their minds, Connacht roared out for the second half and McHugh kicked a penalty within seven minutes to reduce the arrears.
The former Ireland international right-footed over his third success of the night, six minutes later, from all of 55 metres to turn the heat right up on the former champions.
The Ospreys then dug their heels in with Adam Jones only just bundled into touch five metres from the hosts' line.
Drama followed when McHugh ensured a sweet victory for the Irishmen as he banged over another penalty from his own half, and after Marshall had been fortunate to remain on the field for a punch on Tom Tierney, the Connacht number 10 bisected the posts again, eight minute into injury-time.
Connacht: M Mostyn; C McPhillips, P Warwick, G Williams, K Matthews; M McHugh, C Keane; B Wilkinson, A Flavin, S Knoop; D Gannon, A Farley; J Muldoon, M Lacey, C Rigney.
Replacements: J Fogarty, M Diffley, M Swift, B O'Connor, T Tierney, D Yapp, D Riordan.
Ospreys: Lee Byrne; Nikki Walker, Sonny Parker, Gavin Henson, Shane Williams; James Hook, Justin Marshall; Duncan Jones (capt), Barry Williams, Adam Jones, Brent Cockbain, Alun Wyn Jones, Andrew Lloyd, Richard Pugh, Ryan Jones.
Replacements: Richard Hibbard, Paul James, Lyndon Bateman, Filo Tiatia, Martin Roberts, Andrew Bishop, Tal Selley.