The journey from Dubai to the southern port city of Karachi was intended as the first step in his goal of rebuilding his image after years on the political margins. But the former military strongman was met by no more than a couple thousand people at the airport, who threw rose petals and waved flags emblazoned with his image - a small turnout by the standards of Pakistani politics and a testament to how much his support in the country has fallen since he was pushed from power in 2008.
Musharraf struck a defiant tone when he spoke to his supporters outside a terminal at the airport, saying he had proved those people wrong who said he would never return after he failed to follow through on previous promises. He also said he was not cowed by a threat by the Pakistani Taliban to kill him.
"I'm not scared. I'm only afraid of God," Musharraf told his supporters. "For the sake of my country, wherever I need to go, I will go."
Since the former general stepped down in the face of mounting discontent, Pakistan's civilian leadership has struggled with a sinking economy, resilient Islamic extremist factions and tensions with Washington over drone strikes and the May 2011 raid that killed Osama bin Laden.
Musharraf represents a polarizing force that could further complicate Pakistan's attempt to hold parliamentary elections in May and stage its first transition from one civilian government to another.
He is viewed as an enemy by many Islamic militants and others for his decision to side with America in the response to the Sept. 11, 2001 terrorist attacks. On Saturday, the Pakistani Taliban vowed to mobilize death squads to send Musharraf "to hell" if he returns.
Also Saturday, militants launched a suicide car bomb attack against a military check post in the country's northwest tribal region, killing 17 soldiers, the army said.
Musharraf's supporters, including elements of the military and members of Pakistan's influential expatriate communities, consider him a strong leader whose voice - even just in parliament - could help stabilize the country.
Musharraf also faces legal charges, including some originating from the probe of the 2007 assassination of former Prime Minister Benazir Bhutto, who also spent time in self-imposed exile in Dubai before returning.
The flight from Dubai came after several failed promises to return in recent years. Musharraf announced in early March that he would lead his party, the All Pakistan Muslim League, in May elections.
Musharraf met briefly with reporters in Dubai before heading to the airport wearing a white shalwar kameez - the traditional loose-fitting outfit in Pakistan - and sandals from the country's Peshawar region near the Afghan border. He mingled with supporters aboard the plane on the way to Karachi, as some of them chanted slogans for his party.
Musharraf tweeted that he was "thrilled to be back home" soon after he landed in Karachi. But there were moments of tension among his supporters when security forces whisked him away in a convoy of about a dozen vehicles, raising concerns he was being detained for the legal charges against him. It turns out he was simply being shifted to a different terminal, and his supporters had to wait over two hours before he came out to address them.
The former president plans to spend a few days at a hotel in Karachi, where he and his team will hash out their plan for the upcoming election, said spokeswoman Saima Ali Dada. He will then travel to Islamabad. Meanwhile, his legal team will meet to decide the best way to respond to the charges against him.
"He is hoping for the best," said Dada.
Musharraf took power in a 1999 coup and was forced out of office in 2008 amid growing discontent over his rule and the threat of impeachment by the country's two most powerful political parties. He has since lived in Dubai and London.
His decision to return was given a boost last week when a Pakistani court granted him pre-emptive bail - essentially preventing his immediate arrest - in three cases in which he's implicated, including Bhutto's death. He now has 10 days to appear in court. He has dismissed the various charges as baseless.
His return comes as Pakistan seeks for the first time to hand power from one elected government to another.
On Sunday, the country's election commission appointed a former high court chief justice nominated by the country's outgoing ruling party to serve as caretaker prime minister in the run-up to the election. The commission chose Mir Hazar Khan Khoso out of four nominees, two submitted by the recently ruling Pakistan People's Party and two by the main opposition Pakistan Muslim League-N.
Khoso served as the chief justice to the high court in southwest Baluchistan province and also briefly served as the acting governor of the province.
The election comes as the country is struggling with rolling blackouts, rising inflation and widespread security problems.
On Saturday, the Pakistan Taliban released a video threatening to unleash suicide bombers and snipers against Musharraf if he comes back. One of the two people speaking in the video was Adnan Rashid, a former Pakistani air force officer convicted in an attack against Musharraf. The Taliban broke Rashid out of prison last year, along with nearly 400 other detainees.
"The mujahedeen of Islam have prepared a death squad to send Pervez Musharraf to hell," said Rashid, who spoke in the video in front of a group of about 20 militants holding rifles. "We warn you to surrender yourself to us. Otherwise we will hit you from where you will never reckon."
Musharraf had been expected to address supporters at a gathering Sunday in Karachi near the mausoleum of Pakistan's founding father Mohammed Ali Jinnah. But police decided to cancel his permit because of a "very serious threat," said Tahir Naveed, the deputy inspector general of Karachi police. He said Musharraf would be provided with an armored vehicle to protect him. Banners and billboards welcoming Musharraf back to Pakistan lined the street from the airport.
In the aftermath of the 9/11 attacks, Musharraf came under intense pressure from the U.S. to back the Americans in the coming war in Afghanistan and cut off ties with the Taliban, which he did. For that, militants as well as many other Pakistanis saw him as carrying out the American agenda in Pakistan.
He's also vilified by militants for ordering the 2007 raid against a mosque in downtown Islamabad that had become a sanctuary for militants opposed to Pakistan's support of the war in Afghanistan. At least 102 people were killed in the weeklong operation, most of them supporters of the mosque.
Militants tried to kill Musharraf twice in December 2003 in Rawalpindi, where the Pakistani military is headquartered. First they placed a bomb intended to go off when his convoy passed by. When that didn't work, suicide attackers tried to ram his motorcade with explosives-laden vehicles. The president was unhurt but 16 others died.
In addition to the Bhutto case, Musharraf also faces charges resulting from investigations into the killing of Akbar Bugti, a Baluch nationalist leader who died in August 2006 after a standoff with the Pakistani military. In another case, he's accused of illegally removing a number of judges including the chief justice of the supreme court.
Santana reported from Karachi, Pakistan. Associated Press writer Rasool Dawar in Peshawar, Pakistan, and Zarar Khan in Islamabad contributed to this report.