The decision to appoint retired army chief Raheel Sharif as head of the 39-nation Islamic coalition was taken by the state of Pakistan, said a military spokesman on Wednesday. 

"Raheel Sharif's appointment to the Saudi-led military alliance is a decision of the state of Pakistan," said Inter-Services Public Relations Director General Maj-Gen Asif Ghafoor.

The government has given a No Objection Certificate (NOC) to Raheel Sharif to lead the Saudi-led coalition of 39 Muslim countries.

Raheel Sharif was selected last year by Riyadh as the commander of the Saudi-led alliance of Muslim-majority countries aimed at counter-terrorism. But this prompted concerns among politicians and within the army command that Pakistan was becoming too involved in an organisation that excluded Iran and Iraq, where the government is dominated by Shiites.

A retired army general claimed that Prime Minister Nawaz Sharif had agreed to Saudi Arabia’s request of appointing former army chief Raheel Sharif as the commander of the Muslim coalition hours before the news was made public.

“Before his meeting with Raheel Sharif, the Saudi defence minister had requested PM Nawaz that the then army chief should be made the commander of the 39-nation Muslim coalition,” said Major General (retired) Ejaz Awan in a talk show.

“He (Nawaz Sharif) told Raheel Sharif that the kingdom ‘wants you to lead the Saudi-led alliance after retirement. I have made the commitment, I have said yes to them. You don’t say no,’’’ he added.

Awan said it was the prime minister himself who decided that Raheel Sharif will be sent to Saudi Arabia to lead the Riyadh-based Islamic coalition against terrorism.

Defence Minister Khawaja Asif said that Raheel Sharif's appointment had been finalised earlier in January.

A statement carried by Saudi state news agency SPA in December 2015 said the new coalition would have 34 members, though more have joined since then. It also said the coalition would be based in Riyadh to "coordinate and support military operations" against terrorism.

The states it listed as joining the new coalition included Egypt, Qatar, the United Arab Emirates, Turkey, Malaysia, Pakistan and several African nations.

It did not include Iran and its allies Syria and Iraq, leading to speculation that it could become a potential Sunni bloc against Iran, a rival of Sunni Saudi Arabia for influence across the Arab world. Tehran and Riyadh are ranged on opposite sides in proxy conflicts in Syria and Yemen.

Raheel Sharif retired last November, the first Pakistani army chief in more than 20 years not to seek an extension to his term like some previous military leaders.