Cavan dropped back into the relegation picture in Division 3 as they lost a five-point lead to lose against struggling Offaly at Breffni Park.
The sides were level at 0-3 to 0-3 but Cavan took control to lead 0-9 to 0-4 late in the first half.
After trailing by four at the break, Offaly suffered a further blow when they had Shane Sullivan sent off.
However, Offaly fought back to lead, helped by a 50th-minute Ken Casey penalty, and went on to win by two.
Offaly went into the game having not earned a point in four previous games and Cavan looked to have matters in hand as they bossed the second quarter to lead 0-9 to 0-4.
However, Offaly had the final score of the first half and went on to dominate the second half despite having Sullivan sent off in the 41st minute.
A bad day for Cavan was compounded by having Gearoid McKiernan stretchered off because of injury.