Pakistan registered a three-wicket victory over South Africa to secure their spot in the ICC U-19 Cricket World Cup semifinals, here in Christchurch on Wednesday.