Replacements: Aaron Cairns, Aaron Ferris, Jonny Madden, Andrew Harper, Tim Morton.
Replacements: James O'Donoghue, Ariel Robles, Shawn Pittman, Cameron Falcon, Will Scott.
In the opening exchanges Dublin University looked the more composed, their half-backs Michael McLoughlin and David Joyce using the kick and chase game to great effect.
Out-half Joyce opened the scoring in the 10th minute with a penalty goal for Trinity after referee John Carvill reversed a 'Hinch penalty for back-chat.
The score remained 3-0 until close to the half hour mark. Trinity managed to keep their discipline as Ballynahinch infringed at the breakdown on several occasions.
Jocye missed a shot at goal in the 28th minute but was on target three minutes later after 'Hinch were caught using their hands in a ruck, Joyce's efforts taking the students six points clear.
This was a very physical encounter with no quarter given or asked by either side in the drizzly conditions. 'Hinch got their first points on the board following their first serious attack in the 34th minute.
The pack forced play into the visitors' 22, Gavin Armstrong and Chris Napier working hard to prevent Trinity getting to the ball until they eventually strayed offside in front of their posts. Michael Lawton converted to close the gap.
It was a hectic end to the first 40 minutes. A collapsed scrum in the 37th minute allowed Joyce to put another three points on the board. Lawton and Joyce then added a further penalty each to leave the visitors leading 12-6 at half-time.
Whatever Ballynahinch coaches Derek Suffern and Charlie McAleese said at interval, it had the desired effect. The County Down outfit started the second half like a different team.
They had a much greater intensity and played with a lot more accuracy. In the 48th minute James Thompson moved the ball across the 'Hinch back-line to find Rodger McBurney taking a great line.
The big full-back made good ground, pulling in defenders as they tried to stop him before he released the ball to Adam Craig who did extremely well to make it over in the corner. Lawton added the extras from the touchline for a 13-12 scoreline.
The seven-pointer lifted the hosts and when James Simpson smashed his way through a gap in midfield the 'Hinch pack poured through in the 51st minute.
Jonny Simpson took play forward and almost made the line himself, but Blane McIlroy made sure the quick ball was flashed left with McBurney on the burst under the posts to crash over for the second 'Hinch try. The conversion was tagged on by Lawton.
'Hinch failed to release a tackled player on the ground allowing Trinity to hit back with a fifth Joyce penalty goal in the 58th minute, closing the gap to 20-15.
A kick through and chase by Stuart Morrow and Thompson in the 63rd minute ended under the Trinity posts with 'Hinch being awarded a five-metre scrum, but this great attacking opportunity was wasted when McIlroy was pinged for a crooked feed.
The let-off visibly lifted the visitors and they quickly took play deep into the 'Hinch half where, in the 65th minute, a clever counter attack led by full-back David Fanagan released winger Niyi Adeolukan who demonstrated some skilful running as he beat a number of defenders and raced clear to score.
Adeolukan's sixth try of the league run was converted by Joyce as the visitors moved back ahead at 22-20.
To their credit, Ballynahinch never let their heads drop. With seven minutes remaining, the 'Hinch scrum proved too powerful for the students to handle and the home side won a penalty. Lawton landed the kick to push the home side ahead again.
'Hinch kept control of the ball and with just two minutes left on the clock, the students' frustration finally gave way and Lawton converted another penalty goal.
It was all Trinity in the final few minutes as they pressed hard for a winning score, but great work from the 'Hinch pack secured possession at a crucial lineout and they managed to clear the danger and hang on for a hard-fought victory, which has sent them eight points clear at the top of the table.
Referee: John Carvill (IRFU)