Protesters led by cricketer-turned-politician Imran Khan and firebrand cleric Tahir ul-Qadri have rallied in Islamabad for almost two weeks and vowed to occupy the capital until Sharif resigns - a demand the premier has firmly rejected.
In his first public remarks since the start of the crisis, he did not say explicitly how the deadlock might be solved but said he was fully committed to democracy.
"We are not one to be scared of such things," he said. "We have seen ups and downs, we have seen highs and lows, we have seen times when we have not only borne problems but borne them with a smiling face and without complaining.”
Just outside the parliament where he addressed members, thousands of protesters camped out in the heat, but the gathering was peaceful and the atmosphere was festival-like.
Security forces protecting the building looked on but did nothing to disperse them.
"I want to say with complete resolve and belief that, God willing, this journey of the supremacy of law and constitution will continue in Pakistan,” Sharif said told a sparsely attended session of parliament.
"This democracy will keep taking us forward, keep making Pakistan shine, and make Pakistan proud and a day will come when it will never again be disrupted or halted."
Pakistan has been ruled by the army for half of its history and the military's position in the standoff will ultimately determine whether the protests eventually fizzle out or take on a more violent course.
If the all-powerful army referees a solution to the stand-off, it will emerge strengthened at the expense of the prime minister in the coup-prone country.
Sharif, who was himself toppled in a 1999 coup, jailed and then exiled, made a triumphant comeback as prime minister for a third time in last year's general election.
Few believe the military wants to seize power this time, but there is a widespread perception it is using the protests as an opportunity to weaken Sharif.
Government officials and protest leaders have been in sporadic talks since last week to find a peaceful solution but Khan has refused to back down unless Sharif quits over accusations that he rigged the last election.
Qadri has given the government another deadline to quit by the middle of this week, saying otherwise circumstances might be "uncontrollable". But as of Wednesday afternoon, the protesters still sat outside parliament and no solution was in sight.
(Editing by Maria Golovnina) CREDIT: REUTERS