Pakistan's former President Pervez Musharraf was buried Tuesday in his family's hometown, the southern port city of Karachi, a day after a special plane transported his body from the United Arab Emirates where he died on the weekend.

About 2,500 mourners — including Musharraf's family and relatives, senior politicians and retired and serving military officials — attended the funeral at a military cemetery inside a high-security area in Karachi, the capital of southern Sindh province.

Musharraf, who died at age 79, seized power in a bloodless coup in 1999 by ousting the elected government of former Prime Minister Nawaz Sharif, whose younger brother Shahbaz Sharif is now the country's prime minister.

Amir Muqam, a senior leader from Sharif's party, attended the funeral. Musharraf's coffin was draped in the national flag in a sign of respect, though the ceremony was not a state funeral.

PLANE CARRYING DECEASED PAKISTANI EX-PRESIDENT ARRIVES IN KARACHI

Gen. Sahir Shamshad Mirza, the chairman of the Joint Chiefs of Staff Committee, and former army chief, Qamar Javed Bajwa, also attended.

"Gen. Pervez Musharraf always put the interests of Pakistan first, and he even put his life at risk by waging a war against militancy," Moinuddin Haider, a retired army general, told reporters.

AP Photo/B.K. Bangash, File

Pakistan's former President Pervez Musharraf gestures at a news conference on March 23, 2000, in Islamabad. Musharraf has died at the age of 79. His funeral was held on Tuesday. (Pervez Musharraf )

Several politicians and government officials also paid glowing tributes to Musharraf.

During his tenure as president, Musharraf made Pakistan a key ally of Washington in the war on terror after the Sept. 11, 2001 attacks in the United States. That angered Pakistani and foreign militants who at least twice tried to assassinate him in the city of Rawalpindi in 2003, but he escaped unhurt.

PERVEZ MUSHARRAF, FORMER PRESIDENT OF PAKISTAN, SENTENCED TO DEATH FOR TREASON

Musharraf lost his grip on power in 2008 when the party of former president Asif Ali Zardari, Pakistan People's Party, defeated his longtime political allies in parliamentary elections. Zardari later forced him to resign. The new government instigated a treason case against Musharraf — but allowed him to leave the country on bail to travel to Dubai in the UAE in 2016 for medical treatment while the proceedings were underway.

Musharraf remained in Dubai after being sentenced to death for treason at home in 2019, although the death penalty was later overturned by another court.

CLICK HERE TO GET THE FOX NEWS APP

However, Prime Minister Sharif's government last year said Musharraf would not be arrested if his family wanted to bring him back home. But Musharraf’s doctors and his family said adequate medical treatment for him was unavailable in Pakistan.