A visibly-shocked Sharif stepped back after the attack, but quickly regained his composure and made a short speech.
Sharif was attacked as he reached the podium to deliver a speech at an event organised by the Jamia Naeemia outside a madrassa.
They were immediately caught and thrashed by the audience.
In a separate incident Saturday, a man threw ink on Foreign Minister Khawaja Asif during a convention of his political party in Punjab province, blackening his face.
The whole fiasco was broadcasted live on local television channels.
Talking to media following a meeting between party chairman Imran Khan and Balochistan Chief Minister Abdul Quddus Bizenjo, the spokesperson said the party chief agreed on Sadiq Sanjrani as candidate for Senate chairmanship.
Nearly all the mainstream political parties and their leaders, including Chairman Pakistan Tehreek-e-Insaf (PTI) Imran Khan and former president Asif Zardari, on Sunday condemned the incident of hurling shoe at former prime minister Nawaz Sharif, ARY News reported. "I want to tell both PTI workers and the public that throwing shoes or ink on people is not the right way to protest".
Maryam also criticised the Joint Investigation Team (JIT) on the handling of the Panama Papers case and said that it found "nothing despite spending millions of Pakistani rupees". However, the police managed to disperse them after a while and shifted the suspects to an unidentified place for interrogation.
She then lambasted at Pakistan Tehreek-e-Insaf (PTI) chairman Imran Khan, alleging that he had been promoting a culture of intolerance in the society and use of foul language in politics, The Dawn reported.
On February 24, interior and minister for planning, development, and reforms, Ahsan Iqbal also had a shoe thrown at him by Bilal Haris while addressing a worker's convention in Narowal.
Jamie Carragher issues apology over "out of order" spitting incident
In a tweet on Sunday night, Carragher wrote: "Totally out of order & Ive apologised personally to all the family this evening". She said: "I was extremely angry and disappointed that he could even bring himself to do something like that".