ISLAMABAD (Reuters) - Former military ruler Pervez Musharraf left Pakistan on Friday for medical treatment in Dubai after the government lifted a travel ban imposed on him as he awaited trial on treason and other charges, his spokesman said.

Pakistan's former President Pervez Musharraf speaks during a news conference in Dubai March 23, 2013. REUTERS/Mohammad Abu Omar

Pakistan’s Supreme Court ordered the government on Wednesday to lift the travel ban, paving the way for Musharraf to leave.

“General Pervez Musharraf has left the country for Dubai,” his spokesman Mohammad Amjad said.

The departure of Musharraf, who has faced a battery of court cases since returning home from self-imposed exile in 2013, will remove a source of friction between the army and Prime Minister Nawaz Sharif.

Media showed images of Musharraf leaving his home in a heavily guarded convoy for the airport in the port city of Karachi. He entered the airport through a gate reserved for staff and left for Dubai on an Emirates flight.

“I am a commando and I love my homeland,” Musharraf told Pakistani media at the airport.

“I will come back in a few weeks or months.”

His lawyers have argued that he needed to travel abroad for medical treatment and to visit his ailing mother in Dubai.

Interior minister Chaudhry Nisar Ali Khan said on Thursday the former ruler was being allowed to travel abroad for treatment after a commitment from his lawyers that he would return in 4-6 weeks to face the charges against him.

Musharraf came to power in 1999 in a bloodless coup against Sharif and stood down nine years later when threatened with impeachment.

He returned to Pakistan in March 2013 after nearly four years of self-imposed exile to contest elections, despite the possibility of arrest and death threats from the Taliban.

He was acquitted earlier this year of the murder of a separatist leader in 2006.

Musharraf has also been charged in connection with the 2007 assassination of former prime minister Benazir Bhutto and the murder of a prominent cleric.

Pakistan’s military has ruled the South Asian nation for almost half of its 69-year history. It sets foreign and security policy even when civilian administrations are in power.

But the powerful generals have meddled far less in politics than in Musharraf’s era, preferring instead to let civilian governments take the heat for Pakistan’s failures.