Hundreds of people have attended a state funeral for Ruth Pfau, a German nun who spent more than 50 years helping Pakistan's most vulnerable people and fighting against leprosy.

Huge crowds gathered for the procession and funeral service in the southern port city of Karachi on Saturday as politicians, military officials and members of civil society paid tribute to the woman dubbed "Pakistan's Mother Theresa".

State TV broadcast live footage of her coffin being carried by a military guard at the city's St Patrick's Cathedral as hundreds of mourners lined the streets.

Martha Fernando, who worked with Pfau at her Marie Adelaide Leprosy Centre, said the German physician's death was a great loss to humanity.

"There is no one like her and there won't be any replacement to her. We pray to God to send people like her again to this world so that they could continue serving people," she said.

Pfau, who died on August 10 at the age of 87, trained as a doctor in her youth before arriving in Pakistan in 1960.

She specialised in the treatment of leprosy, a disease that causes discolouration of the skin, sores, and disfigurements.

Pfau's work earned her the Nishan-e-Quaid-i-Azam, one of Pakistan's highest civilian awards.

Her death drew messages of condolences from all sections of society with tributes pouring in on social media.

Karachi Mayor Wasim Akhtar wrote: "Her selfless and unmatched service to humanity will be remembered and she will remain in our hearts as Shining Star."

Last Rites of Dr Ruth Pfau, Her selfless & unmatched service to #Humanity will be remembered & she will remain in our hearts as Shining Star pic.twitter.com/MhQGXcbnYe — Wasim Akhtar (@wasimakhtar1955) August 19, 2017

Singer-songwriter Fakhr-e-Alam said: "Looking back at da life of Ruth Pfau & watching images of her funeral all one can say what a legacy..The kinda legacy that defines humanity."

Looking back at da life of Ruth Pfau & watching images of her funeral all one can say what a legacy..The kinda legacy that defines humanity. — Fakhr-e-Alam (@falamb3) August 19, 2017

"Dr Ruth Pfau departs today..we will b poorer without her," wrote foreign minister Kawaja Asif, adding: "Nation is forever indebted to her."

Dr Ruth Pfau departs today..we will b poorer without her.. Nation is forever indebted to her.. — Khawaja M. Asif (@KhawajaMAsif) August 19, 2017

Columnist Bina Shah said that Muslims and Christians were brought together in an act of solidarity as they paid tribute to her services.

#DrRuthPfau's casket being lowered into her grave by Christians and Muslims, collectively — Yusra Askari (@YusraSAskari) August 19, 2017

Writer Mehr Tarar compared Pfau to philanthropist Abdul Sattar Edhi, who died last year, calling her a "hero" of humanity and Pakistan.