Second half gals from Aron Gunnarsson and a Fraizer Campbell brace proved too much for a City side that led through Edin Dzeko, but looked anything other than title contenders. Their second, from Alvaro Negredo, arrived two minutes into stoppage time.
Mackay, who spent £28 million (32.6 million euros, $43.6 million) over the summer in a bid to fight relegation, said: “I am absolutely delighted. For everyone at this football club, this day was a long time in coming. But what a day it was.
“It meant a lot to a lot of people so at the end of the game, I have to admit that I felt very proud for those people. Of course I felt proud for the players, but the fans too and the members of staff who work here. They have been through some tough times.”
Not such a joyous afternoon for opposite number Manuel Pellegrini, although he wasn’t blaming a surprisingly porous defence.
“I don’t think our defence cost us today. There was no problem in central defence,” he said.
“Cardiff didn’t cause us many problems, but the game was decided by two corners.
“Defending set-pieces is a duty for the whole team, not just the goalkeeper or the defenders. It doesn’t matter who is guilty.
“When we scored the first goal I thought it could be easy for us because we were playing a team that had 10 players in their box. But we didn’t play well. However, we didn’t play badly either.
“It’s important for Edin to score. He played well. We also have Negredo who also scored. As an attacking team it’s very good to score two goals away from home. But we had another problem.”
Dzeko gave the visitors the lead seven minutes into the second half with a 25 yard strike that left Cardiff goalkeeper David Marshall clutching at thin air.
However, Gunnarsson’s 60th minute equaliser, after Joe Hart had kept out Campbell’s near post shot, and Campbell’s headed goals on 77 and 83 minutes gifted the Bluebirds a first victory in top flight football since 1962.
“I was delighted to get Fraizer from Sunderland for £600,000,” said Mackay. “It was a great bit of business on our part. He has worked so hard over the summer. I know he has had one cap but there is no reason that he can’t force his way back in. He was just what we needed and I knew that he would cause problems.
“He knew he had to get fitter than he was, but he has and he’s someone who can go from strength to strength. He is a strong, strong boy. He is brave and honest. He has got all of that.”