(CNN) -- Better late than never.
Jerome Boateng, the man who once wore the blue of Manchester City, struck an 89th minute winner as Bayern Munich claimed a dramatic 1-0 victory in its opening game of the European Champions League.
It was a goal which had seldom looked like coming given Bayern's profligacy in front of goal and the inspired performance of Joe Hart, the Manchester City goalkeeper.
For 88 minutes, Bayern, champion in 2013, laid siege to the City goal with Hart producing save after save to thwart the German side.
And then, with 89 minutes on the clock, Bayern finally made the breakthrough courtesy of Boateng.
City, so disciplined in defense and having worked tirelessly throughout, failed to clear its lines and when the ball dropped to Boateng, the defender unleashed an unstoppable effort which brushed off the back of Mario Gotze and flew into the top corner.
It was harsh on a City side, which although rarely looked like winning the contest, played with a determination and tenacity which almost earned it a point.
For all the hype surrounding the fixture, this game failed to catch light with both teams struggling to produce their best form.
Bayern, which was beaten on home turf by City in the group stage last season, wasted a number of opportunities to win the tie on a frustrating night at the Allianz Arena.
But Boateng's late strike provided welcome relief and left City's players crushed.
"We fought hard all night against a good team," Hart told Sky Sports. "You know what you get when you come here.
"A nasty deflection at the end has done us and Jerome Boateng comes back to haunt us.
"It would have been well deserved draw, we made them work hard for everything."
City will now hope to record successes against Italian side Roma and Russian club CSKA Moscow if it is to have any chance of qualifying for the last-16.
Manuel Pellegrini's side is more than capable of progressing to the next round and while defeat will be hard to take, it showed more than enough to suggest it can still enjoy success in this competition.
Last season, City endured a disastrous opening 12 minutes at the Allianz Arena in which it conceded twice and threatened to implode.
That it did not spoke volumes for the resilience and character of Pellegrini's players, who staged a sublime fightback to claim an unlikely 3-2 victory.
On this occasion, it was indebted to its goalkeeper, Joe Hart, who produced a series of outstanding saves to keep Bayern on bay.
Having already squandered a fine opportunity within the opening minute after Thomas Muller failed to convert from close range, Bayern was frustrated further by Hart.
The England international produced a remarkable stop to deny Muller after the Bayern man's thumping header appeared certain to find the net.
Hart was then called upon once again to push deal with Gotze's deflected effort as the home side exerted its dominance.
City, which has failed to win either of its previous two Premier League games, was beginning to creak under the pressure and Hart was forced to palm away David Alaba's fierce drive.
Bayern, which was humiliated on its last Champions League appearance by eventual winner Real Madrid last season, continued to dominate the tie.
Robert Lewandowski, an off -season signing from rival Borussia Dortmund, was next to go close, running in behind the defense before dragging his effort wide from a tight angle.
Bayern, without the injured Franck Ribery, continued to pressurize City after the interval but struggled to create a clear opportunity.
And when it did, with 20 minutes remaining, Hart was in the right place at the right time to thwart Muller from close range.
City, which had rarely looked like threatening, might have stolen victory late on had the referee awarded a penalty when Mehdi Benatia appeared to foul David Silva.
But Bayern survived and only another wonderful save by Hart prevented Boateng's rasping effort from nestling in the far corner.
That save appeared to have ensured City would escape with a point as the clock ticked down.
But there was still one more twist in the tale and when City failed to clear Philipp Lahm's cross, Boateng struck a powerful effort which took the faintest of deflections off Gotze's back and flew past Hart.
Boateng, who spent one season at City before moving to Munich in 2011, wheeled away down the touchline to celebrate with his manager, Pep Guardiola.
Sergio Aguero, so often City's savior, almost carved out a late equalizer at the death but he struck his effort wide of the post after running through on goal.
In the group's other game, Roma, which takes on City next, thrashed CSKA Moscow 5-1.
Elsewhere, Barcelona gained a 1-0 win over Cypriot minnow Apoel, Chelsea was held 1-1 by Schalke and Ajax recorded a 1-1 draw with Paris Saint-Germain.
Porto was the big winner of the night in Group H with a 6-0 victory over BATE Borisov.