Derry secured a place in the McKenna Cup semi-finals as they edged out Donegal 1-8 to 0-9 at MacCumhaill Park.
Conleth Gilligan hit a third-minute penalty for Derry but five Dermot Molloy points helped Donegal lead 0-7 to 1-2 at the interval.
However, four unanswered points put Derry in control and they held on.
Five second-half points from sub Martin Dunne helped Cavan beat UUJ 0-16 to 3-5 in the other Section C clash with Diarmuid McNulty scoring two UUJ goals.
At Breffni Park, scores were hard to come back early on with Cavan not opening their account until Eugene Keating's 18th-minute point.
Chris Clarke hit the opening score of the game in the ninth minute before Kieran Hughes fisted UUJ's first goal.
The action picked up in the second quarter with scores from Niall Murray and David Givney helping to cut UUJ's lead to the minimum but McNulty's goal gave the visitors a 2-2 to 0-4 lead at the interval.
The introduction of Dunne and John McCutcheon helped Cavan to improve hugely in the second period.
All of Dunne's five points were superb efforts from play.
UUJ didn't manage a second-half score until Leo McCloone's 59th-minute point as Cavan moved into a 0-13 to 2-4 lead.
McNulty's second goal of the night then levelled matters but two late points from Dane O'Dowd and the impressive Gearoid McKiernan helped Cavan edge the verdict.
At Ballybofey, Molloy's five first-half points had helped Donegal lead by two at the break but scores from Gilligan, Eoghan Brown and Gerard O'Kane (two) enabled Derry to take a two-point advantage.
Patrick McBrearty got Donegal scoring again in the 53rd minute but the home team could manage only one more Molloy point as scores from McGuckin and Gilligan helped Derry preserve their 100 per cent record in Section C as they set up a semi-final against Down.
Derry's goal had come in the third minute as Gilligan blasted the penalty past Michael Mullan after Johnny Bonner had fouled Caolan O'Boyle.
Wednesday's Power NI Dr McKenna Cup results
Tyrone 0-13 1-07 Fermanagh
Antrim 2-12 1-14 Queen's
Down 1-05 0-08 St Mary's College
Armagh 0-13 0-12 Monaghan
Donegal 0-09 1-08 Derry
Cavan 0-16 3-05 UUJ