Ulster recovered from being 23-0 down at half-time to get a vital victory over Oyonnax in Pool One of the European Champions Cup.
Key men Ruan Pienaar, Paddy Jackson and Nick Williams all came off the bench for the second half to help the Irish side scrape a remarkable one-point win.
Ulster were in big trouble when Jeremie Maurouard and Uwa Tawalo scored tries.
But backs Rory Scholes and Craig Gilroy, and young prop Kyle McCall, saved them from a damaging defeat.
Ulster, who revived their European prospects with back-to-back wins over Toulouse, are second in Pool One with 13 points - six behind Saracens.
Those December victories over Toulouse would have meant little had they lost to the Pool outsiders at the Stade Charles-Mathon.
The visitors were soon under pressure as hooker Maurouard drove over for a seventh-minute try from a line-out.
Former Wales outside-half Nicky Robinson added the conversion and then three successive penalties to put Ulster in deeper trouble.
Ulster suffered another blow just before half-time when a loose pass gave Fijian wing Tawalo the chance to sprint from his own half and score under the posts.
Kiss makes key changes
Director of rugby Les Kiss responded to Ulster's plight by introducing the experience of Pienaar and Jackson at half-back, and the power of Williams to the pack, at the break.
It led to a completely transformed Ulster performance and, from the moment Scholes raced 30 metres to the line, the comeback was on.
Jackson added the simple conversion, and then two tries in four minutes from Gilroy and loose-head prop McCall, both converted by Jackson, made it 23-21.
Out of media player. Press enter to return or tab to continue.Rory Best's Ulster came from 23-0 down to win
When Oyonnax prop Horace Pungea conceded a penalty a metre inside the Ulster half, there was a chance to complete the comeback.
Jackson landed the long-range kick to put the visitors into the lead for the first time with two minutes left.
Oyonnax: Etienne, Codjo, Taufa, Sheridan, Tawalo, Robinson, Blanc, Delboulbes, Maurouard, Clerc, Robson, Metz, Gunther, Faasavalu, Wannenburg.
Replacements: Clegg for Robinson (55), Aziza for Blanc (58), Wright for Delboulbes (62), Bordes for Maurouard (52), Pungea for Clerc (60), Maafu for Faasavalu (60).
Not used: Fabbri, Ikpefan.
Ulster: Gilroy, Arnold, L. Marshall, McCloskey, Scholes, Humphreys, P. Marshall, McCall, R. Best, Lutton, Stevenson, van der Merwe, Diack, Henry, Wilson.
Replacements: Ludik for Arnold (23), Reidy for L. Marshall (75), Jackson for Humphreys (41), Pienaar for P. Marshall (41), Black for McCall (20), Herring for R. Best (75), B. Ross for Lutton (78), Williams for Stevenson (41).
Ref: Luke Pearce (RFU).