Chasing 133 for six set by South Africa, Pakistan were tottering at 76 for seven at one stage before Umar Gul played a 17-ball 32-run cameo. Gul along with with Umar Akmal added 49 runs off just 27 balls for the eighth wicket to pull off the sensational win.
And de Villiers said that South Africa lost the plot in the final few overs after spinners Robin Peterson (2/15) and Johan Botha (1/10) bowled brilliantly to set it up for the Proteas.
"It was great game of cricket. I'm proud of the way we fought back. We lost it in the last five overs," he said.
"Captaincy wise one or two errors there, but I'm proud of the boys," de Villiers said referring to his decision to under bowl Peterson and Botha.
Pakistan captain Mohammad Hafeez was delighted with Gul's effort with the bat and said every member of the side is trying to contribute in one or the other way, which augurs well for his side.
"The boys played great cricket. We played a couple of bad shots but it was a great team effort," Hafeez said.
More From This Section
"I knew that Gul could hit it hard. This is a good sign that everybody is contributing. We did well to restrict South Africa but in the end Pakistan was lucky to get this (win)," he added.
Gul, who surprisingly won the Man-of-the-Match award for his batting today, thanked his coaches for his match-winning effort.
"It was a very good knock. I must thank all my coaches."