Image copyright Reuters Image caption Pakistan's army chief General Qamar Javed Bajwa (R) endorsed the sentences

A Pakistani general has been sentenced to life for spying by a military court that also gave death sentences to a brigadier and a civilian official.

The trio were charged with espionage and leaking "sensitive information to foreign agencies", Pakistan's army said in a statement.

It added that Army Chief Gen Qamar Javed Bajwa "endorsed" their sentences.

The army did not reveal who they were convicted of spying for or what information was shared.

However most observers would naturally point to the CIA, says the BBC's M Ilyas Khan in Islamabad. The US and Pakistan have a long history of military co-operation and officers come into frequent contact, he says.

Lieutenant General Javed Iqbal (retired) will serve 14 years of "rigorous imprisonment" - a life term in Pakistan. It is rare for someone of such a senior rank to be convicted of spying in Pakistan, correspondents say.

Lt Gen Iqbal held key positions in the military during his active service, including director-general of military operations, which is responsible for planning and executing all operations inside and outside of Pakistan.

He also held the post of adjutant-general, who supervises discipline and accountability within the forces.

Brigadier Raja Rizwan (retired) was given a death sentence, as was Wasim Akram, an official who worked for a "sensitive" organisation which has not been named.

It is not clear if officers above the rank of brigadier have in the past been convicted of spying for another country, but some senior officials have been convicted either for planning military takeovers or for links to militant groups.

Pakistan's army has its own court system and those convicted are able to appeal.