South Africa pulled off a sensational one-run victory in the first one-day international against Pakistan following a dramatic collapse at Sharjah Stadium on Wednesday night.
Chasing a modest target of 184, Pakistan were coasting at 165-4 after 41 overs at one stage as they recovered after a slow start.
However, they snatched defeat from the jaws of victory losing their last six wickets for 17 runs to be all out for 182 in the 47th over.
Opener Shehzad led the way with a solid knock of 58 off 92 balls rebuilding their innings after the early departure of Jamshed with a 71-run stand for the second wicket with Hafeez (28).
Skipper Misbah (31) also steadied the innings but the dismissal of Umar Amin (20) triggered a sensational collapse as Pakistan lost six wickets for 17 runs in 5.4 overs.
Tahir struck a crucial blow when he trapped Umar Akmal (18) leg before and then returned to removed Afridi and Riaz in the 44th over.
With seven needed for victory, last pair Ajmal and Irfan survived some tense moments including a DRS appeal.
Needing three with Morkel bowling, Irfan got a couple from the first ball of the 47th over before shattering his stumps with his third delivery.
Parnell had the best return of three for 41 and Tahir three for 45 while Morkel and Tsotsobe claimed two apiece.
"We could not handle the pressure, some relaxed shots that cost us the match. We have to forget this game and improve for the next game," said Pakistan captain Misbah.
"I was focusing on making the right decisions for the guys. South Africans always believe we can turn things around. When you get a sniff you have drive it home. Immi (Tahir) was fantastic," said South African skipper AB de Villiers.
Earlier, South Africa recovered to make 183 after being 129-8 at one stage thanks to a blistering half century from Wayne Parnell who made 56 from 70 balls with six boundaries and six.
He received good support from Tsotsobe during a 52-run stand for the ninth which is the highest in ODIs in Sharjah.
Miller steadied the middle order with a breezy 37 off 51 balls with two boundaries and a six after the Pakistan spinners wreaked havoc.
Opting to bat first, Proteas slumped to 86-6 before Miller briefly revived the innings in partnership with Parnell.
Ajmal finished with best figures of four for 30 while Afridi claimed three for 37.
Pakistan snatched defeat from the jaws of victory following a sensational collapse losing their last six wickets for 17 runs to hand South Africa an unlikely win.
Morkel shatters the stumps of Irfan and breaks the hearts of Pakistan to bowl them out for 182 in the 47th over as South Africa pull off a dramatic one-run win in the first ODI in Sharjah.
Mohammad Irfan b Morkel 2 (9b 0x4 0x6)
Irfan survives. Pakistan need three with Ajmal on strike against Morkel. Pak 181-9 in 46 overs.
Irfan and Pakistan survive after South Africa are unsuccessful in overturning the leg before verdict.
Irfan gets a couple of the first ball from Tahir off an inside edge.
Pakistan get two leg byes with Ajmal swinging and missing the remaining deliveries from Parnell to the frustration of South Africa. Pak 179-9 in 45 overs.
Pakistan need seven from 36 balls with Ajmal and Irfan in the middle.
Double strike by Tahir as Riaz trapped leg before to a ball which kept low. Pak 177-9 in 43.5 overs.
Wahab Riaz lbw b Imran Tahir 0 (8b 0x4 0x6)
Tahir gets the big wicket of Afridi who holes out to midwicket with eight needed for victory. Pak 176-8 in 43.2 overs.
Shahid Afridi c Miller b Imran Tahir 9 (5b 1x4 0x6)
Pakistan need 10 form 42 balls with Afridi facing Tahir.
A wicket maiden for Tsotsobe. Pak 174-7 in 43 overs.
Pakistan lose their seventh wicket as Tanvir hangs his bat out to be caught behind. Pak 174-7 in 42.1 overs.
Sohail Tanvir c de Villiers b Tsotsobe 2 (3b 0x4 0x6)
Afridi blasts a boundary off Tahir to the delight of the crowd. Pak 174-6 in 42 overs.
Pakistan lose Amin and Akmal in successive balls and lose the decision review. Pak 165-6 in 41.1 overs.
Umar Akmal lbw b Imran Tahir 18 (17b 1x4 1x6)
Pakistan lose their fifth wicket with victory in sight. Pak 165-5 in 41 overs.
Umar Amin c de Villiers b Tsotsobe 20 (38b 3x4 0x6)
Light shining through from the adjoining football stadium is causing some irritation to the batsman causing another delay in play.
Akmal seems to be in a hurry thumping Morkel for a towering six into the stands.
Umar Amin gets a streaky boundary off Parnell with the ball flying to third man off a thick outside edge. Pak 147-4 in 38 overs.
Umar Akmal opens his account by cracking Parnell first ball through the covers for a boundary. Pak 139-4 in 36 overs.
Parnell claims his third wicket as Misbah chips to gully. Pak 135-4 in 35.5 overs.
Misbah-ul-Haq c du Plessis b Parnell 31 (49b 3x4 0x6)
Amin hits his first boundary lofting Duminy past mid on. Pak 128-3 in 34 overs.
Misbah scores the first boundary after nearly six overs, slamming two off Tahir. Pak 118-3 in 32 overs.
South Africa get another breakthrough as Parnell strikes to dismiss Shehzad who fails to keep down a short ball. Pak 107-3 in 27.5 overs.
Ahmed Shehzad c Smith b Parnell 58 (92b 5x4 0x6)
Misbah hits his first boundary with a reverse sweep off Tahir. Pak 101-2 in 26 overs.
A collison between Shehzad and Faf du Plessis has caused a stoppage.
Hafeez checks his shot but only succeeding a short ball from Parnell to be caught behind. Pak 75-2 in 19.4 overs.
Mohammad Hafeez c de Villiers b Parnell 28 (39b 2x4 0x6)
Shehzad gets another boundary off McLaren slashing through backward point. Pak 72-1 in 19 overs.
Pakistan are coasting along steadily without taking any undue risks. Pak 66-1 in 18 overs.
Shehzad has got into the stride lofting McLaren back over his head for a boundary. Pak 63-1 in 17 overs.
Shehzad gets consecutive boundaries edging Parnell past the slip cordon. Pak 55-1 in 16 overs.
Hafeez gets another boundary off Tahir. Pak 31-1 in 12 overs.
Hafeez finally gets going lofting Parnell over mid-on for his first boundary. Pak 24-1 in 11 overs.
Morkel bowls a third maiden as Pakistan struggle. Pak 15-1 in 9 overs.
Shehzad hits the first boundary of the innings steering Tsotobe past backward point. Pak 10-1 in 6 overs.
Morkel strikes with Jamshed top edging a short delivery. Pak 4-1 in 4.4 overs.
Nasir Jamshed c Miller b Morkel 0 (12b 0x4 0x6)
SOUTH AFRICA INNINGS
South Africa are bowled out for 183 with a ball remaining.
Imran Tahir c Wahab Riaz b Sohail Tanvir 1 (4b 0x4 0x6)
Ajmal picks up his 150th ODI wicket as Parnell wonderful knock comes to an end with Shehzad pouching a skier. SA 181-9 in 48.5 overs.
Wayne Parnell c Ahmed Shehzad b Saeed Ajmal 56 (70b 6x4 1x6)
Parnell completes a maiden ODI half century. SA 174-8 in 47 overs.
A big over for South Africa with Tsotsobe hitting a boundary and smashing an extraordinary six over extra cover off Ajmal. SA 167-8 in 45 overs.
Parnell has taken a fancy to Afridi's bowling clobbering him into the crowd at midwicket for a huge six. SA 155-8 n 43 overs.
Parnell attacks Afridi again lofting him back over his head for a boundary. SA 145-8 in 41 overs.
Parnell continues to defy the Pakistan attack hitting a boundary off Ajmal. SA 138-8 in 38 overs.
Afridi has struck twice within the space of five balls as South Africa crash to 129-8 in 34.5 overs.
Morne Morkel lbw b Shahid Afridi 4 (4b 1x4 0x6)
David Miller c & b Shahid Afridi 37 (51b 2x4 1x6)
Parnell has thumped a loose delivery from Afridi to the fence. SA 112-6 in 31 overs.
Parnell is not going to hang around clubbing Afridi down the ground for a boundary and gets another off an edge. SA 104-6 in 29 overs.
Miller hits the first six of the innings sweeping Hafeez over midwicket. SA 94-6 in 27 overs.
Afridi has worked his magic striking with in his third delivery as McLaren lobs a return catch. SA 86-6 in 26.3 overs.
Ryan McLaren c and b Shahid Afridi 8 (27b 0x4 0x6)
South Africa struggling at the halfway stage of the innings having reach 83-5 in 25 overs.
Ajmal has claimed his third as AB de Villiers chips back a return which is held on the second attempt. SA 63-5 in 18.2 overs.
AB de Villiers c and b Saeed Ajmal 4 (12b 0x4 0x6)
Miller gets his first boundary with a thick outside edge off Riaz to third man. SA 63-4 in 18 overs.
Ajmal strikes trapping Faf du Plessis leg before with South Africa being unsuccessful with the decision review. SA 54-4 in 15 overs.
Faf du Plessis lbw b Saeed Ajmal 12 (26b 2x4 0x6)
Faf du Plessis gets his second boundary driving Irfan down the ground with superb timing to bring up the 50 of the innings. SA 54-3 in 14 overs.
Smith does not last long with Umar Akmal whipping off the bails as the South African captain drags his feet out of the crease and beaten by Ajmal. SA 48-3 in 12.5 overs.
Grame Smith st Umar Akmal b Saeed Ajmal 20 (25b 1x4 0x6)
Smith survives with Pakistan being unsuccessful in overturning the verdict after appealing for a caught behind off Ajmal.
Faf du Plessis goes across his stumps and whips Sohail to the midwicket fence. SA 46-2 in 12 overs.
Ajmal into the attack and concedes just two runs. SA 40-2 in 11 overs.
Tanvir bowls a wicket maiden as South Africa end the mandatory Powerplay on 38-2.
Duminy miscues a short one from Tanvir to be caught by Amin at square leg. SA 38-2 in 9.1 overs.
Jean-Paul Duminy c Umar Amin b Sohail Tanvir 20 (36b 3x4 0x6)
Duminy gets going with a couple of boundaries off Irfan, hooking a bouncer and gliding another to third man. SA 29-1 in 7 overs.
Smith flicks Tanvir to fine leg for a boundary. SA 19-1 in 6 overs.
Duminy hits the first boundary of the match off Tanvir. SA 10-1 in 4 overs.
Irfan strikes with his second as Ingram fends a short ball to be caught behind. SA 0-1 in 0.2 overs.
Colin Ingram c Umar Akmal b Mohammad Irfan 0 (2b 0x4 0x6)
Ingram takes strike against Irfan as the five-match ODI series between Pakistan and South Africa get underway.
South Africa have won the toss and opted to bat in the first ODI against Pakistan at Sharjah Cricket Stadium.
Pakistan: Ahmed Shehzad, Nasir Jamshed, Mohammad Hafeez, Misbah-ul-Haq, Umar Amin, Umar Akmal, Shahid Afridi, Sohail Tanvir, Wahab Riaz, Saeed Ajmal, Mohammad Irfan
South Africa: Colin Ingram, Graeme Smith, JP Duminy, AB de Villiers, Faf du Plessis, David Miller, Ryan McLaren, Wayne Parnell, Morne Morkel, Imran Tahir, L Tsotsobe
Pakistan skipper Misbah-ul Haq is hoping his side can bounce back from their crushing second Test defeat when the five-match one-day series with South Africa starts in Sharjah on Wednesday.
With what he calls favourable conditions in the UAE, Misbah is aiming to put the Dubai defeat by an innings and 92 runs behind him and hopes Pakistan can exploit the conditions.
“We have been really playing well in one-day cricket in the last three-four years, everybody knows what they are going to get against South Africa and these conditions are always in favour of Pakistan so we are looking forward to playing a good series,” said Misbah.
But he warned against complacency as South Africa will be without spearhead bowler Dale Steyn, who is being rested, and Hashim Amla, who returned home as his wife has given birth, for the first two one-day games.
“I always feel that after such news the team gets complacent so if Amla does not play or Steyn doesn’t play it doesn’t make a difference, South Africa is one of the good teams in the world and have very strong replacements,” said Misbah.
Steyn will also miss the second one-dayer, in Dubai on November 1, but is likely to return for the third match in Abu Dhabi on November 6.
The fourth match will also be played in Abu Dhabi, on November 8, before the series ends in Sharjah on November 11.
The two teams will also play two Twenty20 internationals in Dubai on November 13 and 15.
Pakistan will be boosted by the return of all-rounders Mohammad Hafeez and Shahid Afridi, in addition to opener Nazir Jamshed, Umar Akmal and paceman Wahab Riaz.
The Pakistanis won their last two one-day series, against Zimbabwe and the West Indies, while South African went down tamely in Sri Lanka 4-1.
But despite that defeat Misbah reckons South Africa are difficult one-day opponents.
“They are a good decent side, they have players who can really turn the matches around, dangerous side so you really need to be on your toes while playing against them,” said Misbah, referring to the 3-2 home series defeat the South Africans handed Pakistan in March.
Misbah said Pakistan would not be relying only on a spin sttack, led by Saeed Ajmal and backed by Abdur Rehman, Afridi and Hafeez.
“South African are a very good side, they play spin really well, so overall, your bowling attack has to perform,” the Pakistan captain said.
“I think the batsmen will have to raise their game because batting has been our problem in the recent past,” said Misbah, who is the leading run-scorer in one-day cricket this year with 961 from 21 matches.
"We have to hit the ground running. We are away from home and it's important to start well. Starting in Sharjah, it's important for us to adapt as quickly as possible, get used to the conditions and understand the conditions and the Pakistan team," said South Africa one-day captain AB de Villiers.
South African coach Russell Domingo hoped his team take the momentum of the second Test win into the one-day series. “I think the second Test win will help us in our confidence in a way although it is a completely different format but we will take a little bit of confidence,” said Domingo.
South Africa: AB de Villiers (capt), Colin Ingram, Quinton de Kock, JP Duminy, Faf du Plessis, Imran Tahir, Ryan McLaren, David Miller, Morne Morkel, Wayne Parnell, Robin Peterson, Vernon Philander, Graeme Smith, Lonwabo Tsotsobe.
Pakistan: Misbah-ul-Haq (capt) Ahmed Shehzad, Nasir Jamshed, Mohammad Hafeez, Umar Amin, Umar Akmal, Shahid Afridi, Saeed Ajmal, Abdur Rehman, Mohammad Irfan, Junaid Khan, Sohail Tanvir, Wahab Riaz, Sohaib Maqsood, Asad Shafiq, Sarfraz Ahmed