Image copyright AP Image caption Lakhvi (centre) is believed to be the operations chief of Lashkar-e-Taiba

The suspected mastermind of the 2008 Mumbai terror attacks, who has been released on bail by Pakistan despite protests from India, spent his time in prison living in relative luxury.

While Pakistan's government claimed that it was cracking down on terrorists, Zakiur-Rehman Lakhvi and six of his comrades in Rawalpindi's sprawling Adiala Jail had several rooms next to the jailer's office at their disposal.

And with the jailer's permission, they had a television, mobile phones and access to the internet, as well as dozens of visitors a day.

"He [Lakhvi] can receive any number of guests, any time of day or night, seven days a week," said one jail official while the terror suspect was under lock and key.

No special permission was required for visitors, who were not even asked to identify themselves to jail authorities.

This would be unthinkable anywhere else in the world, but elements of the Pakistani establishment are known to have provided such facilities to jailed militant commanders whom they think they may need in future.

Throughout Lakhvi's time in jail, he is said to have maintained operational command of Lashkar-e-Taiba (LeT), the militant group blamed by India for the Mumbai attacks.

Image copyright TBC Image caption The sprawling Adyala Jail allows Lakhvi relative freedom

Pakistan arrested Lakhvi on 7 December 2008, four days after he was named by Indian officials as one of the major suspects behind the November 2008 attacks.

More than 160 people were killed when 10 gunmen carried out assaults on two luxury hotels, a train station, a hospital, a Jewish cultural centre and some other targets in Mumbai.

He was reportedly arrested from a training camp for LeT, which is said to have been fighting the Indian security forces in Indian-administered Kashmir.

Six years later, he hit the headlines again when an anti-terrorism court trying him for the Mumbai killings ordered his release on bail, and in April 2015 he walked free from prison.

Controversial decision

The ruling came barely a day after the horrendous 16 December school massacre in Peshawar, and at a time when the civil and military leadership were making a rare joint call for action against "all shades of terrorism".

Lakhvi's bail seemed to call that resolve into question.

Pakistan has long been accused of creating and nurturing religious militant groups for its geo-strategic aims in India and Afghanistan.

Though some of these groups ultimately turned against Pakistan, the country is believed to have continued to protect the factions it considers central to its security arrangements in the region.

LeT is said to be one such group.

Powerful connections

Lakhvi, 55, was born in the Okara district of Punjab - which is also the native district of Ajmal Qasab, the only gunman in the Mumbai attacks who was taken alive by the Indian security forces.

In 1990, he joined Jamiat Ahl-e-Hadith (JAH), a Salafist movement funded by sources in the Middle East. Later he became a member of LeT, JAH's armed militant offshoot.

He is said to be a close relative of Hafiz Mohammad Saeed, LeT's founder and current chief of Jamat-ud-Dawa (JuD), an Islamic charity Mr Saeed founded when the Pakistani government banned LeT after the 2001 attack on Indian parliament.

Many believe JuD is the civilian face of LeT.

Throughout the 1990s, Lakhvi worked at the LeT's head office near Muridke, Punjab, where JuD is also headquartered.

During this period, he was actively involved in fighting, and later planning combat missions, inside Indian administered Kashmir, according to security sources.

Image copyright AFP Image caption The attacks in Mumbai left more than 160 people dead

He became the operations head of LeT in late 1990s.

Lakhvi and six others were indicted for the Mumbai attacks in Pakistan on the basis of evidence provided by the Indian government.

Trail of suspicion

The evidence included a confession by Ajmal Qasab and some satellite phone data the Indians recovered from a boat that the attackers had hijacked en route from the Pakistani coastal city of Karachi to Mumbai.

Indian officials at the time said Lakhvi had spoken to the attackers during their journey, and may have been in touch during the attacks. They said Qasab identified Lakhvi and said he helped "indoctrinate all the attackers".

But then two developments provided the grounds on which Lakhvi was granted bail.

In 2012, the Indian officials denied a Pakistani judicial commission comprising Lakhvi's defence lawyers, prosecutors and a court official from cross-examining Qasab in Mumbai.

Later, a prosecution witness - a primary school teacher who had taught Ajmal Qasab as a child - turned hostile and testified that Qasab was alive and in Pakistan, and that he had seen him.

Lakhvi's lawyers used the teacher's evidence to try to get him freed, and argued that the charges were concocted as a result of international pressure.

The court accepted the teacher's account.

Many believe Pakistan initially arrested Lakhvi only because Qasab's evidence was so damning.

But once the storm had blown over, analysts say, the Pakistani authorities reverted to their original policy of treating LeT as an ally.

Either way, Lakhvi's bail provoked a strong reaction from India, where Home Minister Rajnath Singh urged Pakistan to take steps to reverse the decision.

Officials say it also upset certain quarters in Washington and Beijing who thought Lakhvi's release could become a major scandal.

Bail challenged

The government employed some damage control by detaining him under the Maintenance of Public Order (MPO) law, but he was released in April 2015.

During more than five years in prison, Lakhvi's uninterrupted access to guests, mobile phone and the internet kept him in effective contact with the LeT rank and file.

A jail official said that even though, since his arrest, the day to day affairs of LeT are being looked after by an acting chief known as Ahmed, Lakhvi remained the group's operational chief.

One official said that Lakhvi, during his imprisonment, received "about 100 visitors every day".

"They are escorted to his private quarters where they can meet him without the watch of jail guards, and can stay for as long as they like."