De Villiers was on 98 not out and Vernon Philander unbeaten on 45 as South Africa reached 334 for six at the close of play at Centurion.
Choosing to bat first, openers Graeme Smith (five) and Alviro Petersen (10) struggled as Pakistan's bowlers used the seamer-friendly conditions to their advantage inside the first hour to leave the hosts on 38-2.
Petersen's miserable series continued when he was trapped plum lbw by Rahat Ali, who returned to the side after missing the second test in Cape Town.
Smith battled for 47 minutes before he became debutant Ehsan Adil's first wicket in test cricket with just the third ball of the seamer's spell when a touch of away movement found his edge and looped towards Younus Khan at second slip.
Faf du Plessis (29) came in at number four in place of the injured Jacques Kallis (calf strain) and after a slow start crashed three boundaries off one Adil over to get his innings up and running.
Adil got his revenge after lunch though, inducing an edge to wicketkeeper Sarfraz Ahmed after the batsman advanced down the track to the medium pacer.
It ended a partnership of 69 between Amla and Du Plessis that helped put the hosts back on track.
De Villiers put on 79 with Amla before the latter fell just eight short of what would have been a deserving century.
Amla's elegant 92 came from 128 balls, but his innings was ended as he attempted to cut a wide delivery from Rahat and got a faint edge through to Sarfraz.
Shortly afterwards Dean Elgar (seven) was trapped lbw by Rahat and Robin Peterson, who had looked untroubled as he breezed to 28, was run out by a direct hit from Mohammad Irfan.
"The wicket is a good contest between bat and ball, when Graeme (Smith) decided to bat first we knew it would be tough. But we made it our day," Amla told reporters.
"There is a bit of nip off the wicket and variable bounce, one end has more bounce than the other.
"We feel 334 is a really good first day total, we hope the wicket will act up even more as the match goes on. We were able to capitalise on some loose balls here and there and put runs on the board."
Rahat, in his second test match, was the pick of the Pakistan bowlers as he collected three for 95.
Pakistan lost Adil late in the day with a leg injury after he had bowled the first ball of a new spell.
South Africa lead the three-match series 2-0 having won the first test in Johannesburg by 211 runs, before completing the series win with a four-wicket victory in Cape Town.