It was a day that Cardiff City supporters had been waiting to celebrate for more than half a century. After a 51-year absence, the Welsh club last night secured their long-awaited return to English football's top-flight and all the riches, and kudos, that comes with a place in next season's Premier League.

Those Cardiff fans hoping for a straightforward evening were left biting their fingernails as Malky Mackay's side desperately searched for the goal that would have eased the tension. Instead it was news from elsewhere that started the celebrations, when it emerged that Millwall had taken the lead late on against Watford, who needed to win to have any chance of catching Cardiff.

Millwall held on for a 1-0 victory that secured automatic promotion for Cardiff irrespective of the game here, which finished moments after the final whistle had blown at The Den. There were emotional scenes as Craig Bellamy, the hometown boy, collapsed to his knees, wiping tears from his eyes as fans invaded the pitch.

Some 20 minutes later, when the field was cleared, Vincent Tan, the club's Malaysian owner, emerged to rapturous applause. If his hugely controversial decision to change Cardiff's kit from blue to red caused a furore in the summer, the infamous rebranding exercise seemed a million miles from supporters' minds when champagne corks were popping in the home dressing room. The players, along with Mackay and his staff, later completed a lap of honour before another pitch invasion.

Having watched Swansea blaze a trail over the past two years, Cardiff will hope to step out of their shadow next term. With two clubs in the Premier League, Welsh football has never had it so good.

The big test is to come for Cardiff and it remains to be seen whether they can be competitive in the top flight, where Tan has said he will make up to £25m available to improve the squad.

Although a goalless draw at home was a less than inspiring way to clinch promotion, it is hard to begrudge Cardiff their place in the Premier League. They have been top of the table since the end of November and, with a seven-point lead over second-placed Hull City with only three games remaining, should go on to be crowned champions.

History was on Cardiff's side against Charlton. The Welsh club were last promoted to the top flight 53 years ago to the day, following a 1-0 win over Aston Villa in front of 52,364 at Ninian Park. Cardiff have since moved home and the crowd was half that number here but the sense of excitement was tangible. Premier League scarves – "Up where we belong" – were on sale outside the stadium and there was a buzz inside, where Cardiff fans chanted about competing with Swansea next season, albeit not quite in those words.

It has been quite a journey for Cardiff to get to this point and those with longer memories will remember the darker days, taking in everything from humiliating FA Cup defeats at the hands of non-league opposition to winding up orders and relegations. It is remarkable to think that Cardiff finished third from bottom in the fourth tier in 1996 and, although they won promotion three years later, they were back in the basement division in 2000. By hook or by crook they have climbed up through the leagues, often living beyond their means, although overcoming the last, and most important, hurdle proved to be the toughest.

Nine seasons have been spent in the Championship and in each of the past three years Cardiff have lost in the play-offs. There was also the FA Cup final defeat by Portsmouth in 2008 and the League Cup final loss to Liverpool last season. Against that backdrop, the more pessimistic Cardiff supporters could have been forgiven for refusing to count their chickens before a ball was kicked against Charlton, even if the odds were stacked heavily in their favour.

An early goal would have eased the nerves but it was Charlton who came closest to taking the lead when Johnnie Jackson's free-kick was superbly touched onto the post by David Marshall, the Cardiff goalkeeper. Marshall, who has been one of Cardiff's best players this season, made another fine stop in the second half, when he turned Ricardo Fuller's curling effort, which was heading for the far corner, around the upright.

Cardiff also had chances – Andrew Taylor's left-foot drive clipped the outside of the upright in the first minute of the second half and Bellamy blazed over from an inviting position earlier – although from the moment that Watford fell behind, the game lost its significance and it was a case of counting down the clock.

Chris Powell, the Charlton manager, made his way across to the home dug-out to offer his congratulations while play was still going on. "I spoke to Malky a minute before the final whistle," Powell said. "We go back a few years, we were team-mates at Watford and West Ham. I tasted some success last year, albeit it winning promotion from League One to the Championship.

"Malky's been managing a bit longer than me and now he's got Cardiff to the Premier league. They've been so close before, almost touching it at times. I said to him: 'Enjoy the moment, this is your time.' I hope they make a real fist of it."