This was a timely lift for Bohemians who signalled their season-ending intentions by claiming the fourth spot they covet and the prospect of potential European football that it could yet yield.
Gareth Farrelly's side have now leapfrogged Drogheda and the Dublin club will now hope to put some daylight between themselves and the FAI Cup finalists when the two meet at United Park on Tuesday.
Bohemians were, perhaps, a shade more inventive in the early stages with Fergal Harkin particularly menacing when cutting in off the flank. But despite his impressive display, some of those ahead of him were not quite tuned in.
Farrelly was guilty of spoiling a decent move when in a promising position while Stephen Ward's shot from Harkin's pass lacked conviction.
Longford, though, were far from overrun and looked to probe when afforded space. Wingers Alan Kirby and Seán Prunty needed shackling on occasion while striker Dessie Baker showed neat touches and clever flicks.
Bohemians, driven by captain Kevin Hunt, made the breakthrough in the 28th minute though there was a touch of good fortune to Farrelly's goal.
He exchanged quick passes with Mark O'Brien and blasted into a crowded box where the ball took a wicked deflection off Danny O'Connor that left the visiting goalkeeper helpless.
BOHEMIANS: Gregg; Rice, Collins, Byrne, Keddy; O'Brien, Hunt, Farrelly, Harkin; Ward, Grant. Subs: Powell for Ward (42).
LONGFORD TOWN: O'Brien; Gough, Ferguson, O'Cononr, Dillon; Kirby, Fitzgerald, Martin, Prunty; Keegan, Baker. Subs: Byrne for Fitzgerald (half-time), Mooney for Gough (76), Barrett for Prunty (85). Booked: Martin (64), Ferguson (80).
Referee: A Buttimer (Cork)