Pakistan and Azerbaijan both ended their Islamic Solidarity Games men's handball tournament on a positive note in Baku on Friday as they each triumphed in their fourth and final games.
The hosts beat Morocco 31-25 to secure fifth place while Pakistan edged Jordan 33-31 to take seventh.
After easily dealing with Pakistan (43-36) in their opening game, the Azeris fell to Saudi Arabia (31-38) and Algeria (22-35) before taking some consolation against Morocco.
Despite Abderrahim Anour's efforts, including a superb double save, the north Africans headed into the break with a 15-10 deficit as Sabir Nazaraliyev was in clinical form for the hosts with six first half goals.
The 30-year old left back added four more to his tally in the final 30 minutes to ensure fifth place for the Azeri hosts.
"It's our first big competition so fifth place isn't a bad result", said Azerbaijan head coach Hikmat Abdullayev.
"We have a hard working team but we didn't have much time to prepare as a lot of our players come from abroad.
"Honestly, I felt like we could have done more but, all things considered, especially the odd red card against us in the previous game, it's not that bad of a result", he added.
Earlier in the day, Pakistan looked fresh and, thanks to Hazrat Hussain's ten goals, convincingly beat Jordan 33-31, after going into the break with a four point lead (18-14).
Jordan battled hard as experienced Ahmad Almousa's 10 goals and keeper Khaled Ali's saves kept the side in the game at 32-31 after 59 minutes.
But it proved to be not enough as Pakistan's chalked up its first and only win of the tournament.
In the semi-finals on Saturday, 2005 silver medallists Saudi Arabia lock horns with Iraq while Turkey, another nation widely tipped to progress to the latter stages, take on Algeria.