Long’s 78th-minute header was enough for the Republic, but Giovanni Trapattoni’s men might have won more comfortably in front of a crowd of 37,100 with the post, the bar and the heroics of goalkeeper Asmir Begovic denying them.
The win extended Ireland’s unbeaten run to 13 games a day before they leave for their pre-tournament training camp in Montecatini, Italy.
Trapattoni had chosen the Bosnians because he knew they would be technically adept and tactically astute, and would provide his side with exactly the sort of challenge they will face next month with Croatia, Spain and Italy standing between them and their dream of reaching the quarter-finals.
For long periods, Safet Susic’s side retained the ball and passed it confidently with Miralem Pjanic and skipper Zvjezdan Misimovic running the game from central midfield and Manchester City striker Edin Dzeko keeping Richard Dunne on his toes throughout.
But as ever, the Republic were doggedly stubborn and while Dunne had to make a series of important interventions – in the process proving his fitness after a midweek fitness scare – it was not until 40 minutes had elapsed that stand-in keeper Keiren Westwood, deputising for the injured Shay Given, was called upon to make his first save.
Striker Vedad Ibisevic fired wildly over after just four minutes and then only just failed to turn home Dzeko’s ninth-minute cross in a positive start by the visitors.
However, Ireland gradually worked their way into the game and midfielder Glenn Whelan was convinced he should have been awarded a 13th-minute penalty when he burst past central defender Sanel Jahic and appeared to be felled as he rounded Begovic.
Swiss referee Nikolaj Haenni, however, waved away his appeals and as the half wore on, it was Trapattoni’s men who started to make the running.
James McClean, starting a senior international for the first time, set up Darron Gibson to drag a 25th-minute effort wide after an enterprising foray inside from the left wing, and skipper Robbie Keane sent a snapshot over the bar after turning smartly six minutes later.
But the fireworks largely came inside the final five minutes of the half, perhaps prompted by Pjanic’s swerving 30-yarder which very nearly wrong-footed Westwood.
First McClean forced Begovic into a smart save at his near post with a well-struck left-foot drive, and then the keeper had to block at the feet of Damien Duff after Keane’s clever flick had put the midfielder in on goal.
Central defender Darren O’Dea also tested Begovic with a late header, but there was nothing to chose between the sides as they went in at the break.
However, there might have been within two minutes of the restart but for the intervention of the woodwork.
Trapattoni made a double change at the break when he replaced Whelan and Duff with Keith Andrews and McGeady, and the latter almost made an instant impact.
He timed his run to perfection to meet Kevin Doyle’s knock-down and sent a right-foot volley towards goal, but with Begovic beaten, the ball came back off the post.
McGeady’s arrival had seen McClean switch to the right in line with Trapattoni’s intention to school him in international football on both flanks.
Westwood had enjoyed a relatively quiet afternoon, but he found himself in action once again with 59 minutes gone when Pjanic once again took aim from all of 35 yards, this time from a free-kick.
His confidence to shoot proved well-founded as he sent another fiercely-struck effort snaking towards the top corner, where the Sunderland keeper pulled off a fine one-handed save.
Trapattoni, who had signalled his intention to use all seven substitutions allowed in an effort to test the match-fitness of his squad, withdrew first-choice strike-pairing Keane and Doyle with 63 minutes played and sent on Long and Jon Walters in their place.
Dunne too was withdrawn from the fray eight minutes later when he was replaced by St Ledger, but it was at the other end that most of the late action came.
Walters very nearly gave the home side a 74th-minute lead when he met McGeady’s cross with a powerful header, but saw the ball crash back off the crossbar, and the former Celtic winger himself tested Begovic with a viciously-dipping shot two minutes later which almost eluded the keeper.
However, Long finally made the pressure tell with 12 minutes remaining when he rose at the far post to head yet another inch-perfect McGeady delivery home.
It could have been 2-0 within a minute when McGeady put Walters in on goal, but club-mate Begovic closed him down well to block, and then pulled off a remarkable late save to deny Long a second.