It should have been all over by half-time but having passed up one opportunity after another to win this re-run of last season's cup final, Bohemians were made to pay two minutes from time when Stuart Holt salvaged a point with a wonderfully curled free kick from some 25 yards out.
In the end the goal was a fitting reward for a team that had battled their way into a game in which they had looked likely to be well beaten early on.
In the Longford camp the hope had always been that things would improve for the team once the string of injury problems endured since the summer had passed. Last night Stephen Kenny had his first choice defence back in action but as it turned out it took some time for the benefits to be felt as Bohemians made by far the stronger start of the two sides.
In the heart of the visiting back four, Eric Smith had tended to be one of Kenny's most consistent recruits but early on against a Bohemians side whose pace and clever movement of the ball gave Longford problems almost from the very first kick of the ball, the big centre half struggled.
After just seven minutes his blunder 30 yards out allowed Glen Crowe to go one on one with Stephen O'Brien but the goalkeeper reacted well and Crowe, uncharacteristically, squandered the chance by pushing the ball far too wide as he attempted to round his opponent.
Smith's blushes were spared, for a while at least. But coming up to half way through the first period he committed an almost carbon copy error, failing to pull off what looked an entirely straightforward intervention of Crowe's low square ball for Trevor Molloy. Again the striker raced clear into the box although this time there was no mistake as the former under-21 international drove the ball low past O'Brien and into the bottom left corner.
How there weren't more goals for the home side before the break remains a mystery but the sheer determination of O'Brien and his defenders to prevent the ball crossing the line again certainly played a big part. Stephen Caffrey, Kevin Hunt and Dave Hill all went close to wrapping the game up for the hosts before even the half hour was up while Crowe and Molloy also had more chances.
Still, the lead remained only the single goal, though, and even that should have been cancelled out in the 53rd minute when Stuart Byrne hit a side footed shot straight at Wayne Russell.
It was a fairly rare scoring chance for the visitors but there was at least now a bit of bite to their midfield which had been completely overrun in the first period.
Briefly the match became heated and just short of the hour Alan Murphy and Stephen Caffrey were both sent off after a hard looking challenge and a spot of retaliation.
Generally, though, the closing stages produced a much more balanced, open and enjoyable contest in which Crowe still might have added a couple to the margin of victory before Longford did enough to leave for home with both their pride and confidence firmly in tact.
BOHEMIANS: Russell; Shelley, O'Connor, John, Hill (Byrne, half-time); Morrison, Caffrey, Hunt, Webb; Molloy, Crowe.
LONGFORD TOWN: O'Brien; Murphy, Smith, McNally, W Byrne (V Perth, 77 mins); Kirby, Reynolds (Holt, 77 mins), S Byrne, Gavin (Zellor, 77 mins); Lavine, O'Connor.
Referee: P McKeon (Dublin).