Afghanistan and Pakistan were in Group D and though Afghanistan defeated Pakistan in their opener, Pakistan topped the group after Afghanistan suffered a surprise defeat against Ireland in their last group match.
While this is Afghanistan's best finish in an ICC U-19 Cricket World Cup after they claimed 16th, 10th, seventh and ninth positions in the 2010, 2012, 2014 and 2016 events, respectively, this is the third time Pakistan have finished third after 2000 and 2010.
Pakistan, the only country to have won back-to-back titles, in 2004 and 2006, got past South Africa by three wickets in the quarter-finals but suffered a massive 203 runs defeat to India in the semi-finals with the team bundled out for only 69 runs.
Afghanistan lost to three-time champions Australia by six wickets in the semi-finals after a huge 202 runs victory over New Zealand in their last-eight fixture.
More From This Section
Pakistan coach Mansoor Rana said he was happy with the side's third-place finish and reflected on their performance in the tournament.
He praised the fast bowling attack of Shaheen Afridi, Muhammad Musa and Arshad Iqbal.
"I thought we saw talented players in all teams. Pakistan has some really good fast bowlers and also some good batsmen. I think they should be given more time in domestic cricket. There are expectations from them but they should play first- class and A cricket (before graduating to senior international cricket).
Rana said the tournament is a great learning experience for the young players of his side.
"We always aimed to win, prepared well. We played in Australia and New Zealand and had got used to the conditions. The loss to India disheartened us and the boys were glum and not talking at all.
Afghanistan coach Andy Moles was satisfied with his team's effort and saw a bright future for the players.
"We're pleased to finish fourth but would have loved to play Pakistan today. It would have been a chance to test our players against them," he said.
"We did not play well against Australia unfortunately but we've learnt a lot. The theme of the tournament being young stars, we showcased quite a few. Today we missed out on a chance with the local rivalry in the region. Also, in Under-19 cricket you don't know when you get a chance to play."
"The spinners did not bowl as consistently as in the U-19 Asia Cup in Malaysia (in November, which Afghanistan won). When they bowled well, they bowled very well, but at times, they struggled with the length and bowled short," he said.
"Though two of them being picked in the Indian Premier League (Mujeeb by Kings XI Punjab and Zahir by Rajasthan Royals) was a magnificent story. Mujeeb is going from here to join the national side (in Zimbabwe for the ICC World Cup Qualifier).