Outside-half Paddy Jackson kicked six second-half penalties as Ulster came back to secure a notable win over the Ospreys in a closely-fought RaboDirect Pro12 clash at the Liberty Stadium.
Despite the defeat the previously unbeaten Ospreys, who registered a losing bonus point, still went to the top of the table.
Man of the match Jackson's six penalties stole the honours from opposite number Dan Biggar who had put the Ospreys in to a 12-0 lead with four penalties.
Trimble replaced Tommy Bowe, the former Osprey, who failed to recover from a dead leg he sustained in the bonus-point win over Treviso at Ravenhill last week.
It was a dour first half where defences dominated with the difference between the sides were two Biggar penalties as the Ospreys took a 6-0 lead in to the interval.
Ulster had their moments and probably had more time in the opposition 22 than the Ospreys, but the home defence was particularly impressive especially the back-row of Tyler Ardon, making his full debut, Justin Tipuric and Joe Bearman.
The deadlock was not broken until the 21st minute when Biggar kicked a penalty from the 22.
The Ospreys just about edged the scrum with Ulster prop Declan Fitzpatrick getting a final warning from the referee Peter Fitzgibbon for releasing his binding.
And lock Tan Tuohy also got a warning from the referee for elbowing Alun Wyn Jones at a maul resulting in a second penalty for Biggar - the final kick of the first half.
Ulster's discipline let them down twice at the start of the second half as Biggar kicked two more penalties in three minutes as the Ospreys opened up a 12-0 lead.
But dramatically Ulster edged their way back into the match through Jackson's unerring right boot.
It was Ospreys turn for their discipline to let them down as Jackson kicked three penalties in the space of 10 minutes.
On 63 minutes Jackson levelled the match with his fourth penalty to ensure a dramatic finale.
But there was more to come from the accurate fly-half who slotted over two more penalties on 73, when prop Aaron Jarvis was sin-binned, and 77 minutes to ruin the Ospreys unbeaten start to the campaign.