He was speaking at a meeting convened to review the progress of National Action Plan (NAP) devised after the 2014 Peshawar school attack to eliminate militancy.
National Security Adviser Nasir Janjua briefed the meeting which was also attended by cabinet ministers, four chief ministers of provinces, army chief, and other civilian and military officials.
"War against terrorism and violent extremism is a main component of our national policy aimed at bringing peace and security in the country," Sharif said. The prime minister also said the nation pins hope to steer the society out from these evils once and for all and government is committed to overcome this menace.
He said consensus on National Action Plan was formed after discussion among all the stakeholders.
The meeting urged the need for coordinating efforts between federal and provincial governments for achieving desired results. It was agreed that further improvement in intelligence input is required to defeat "designs of enemies".
The meeting agreed on the future course of National Action Plan to achieve the desired results.
Janjua briefed the meeting on the implementation status of NAP and the challenges faced at this stage of implementation, an official statement said.
"It was agreed that collective efforts at the national level and specific efforts at provincial level are required to consolidate the gains made so far and move further in certain areas where progress has been unsatisfactory," it said.
"It was stressed by NSA that role of provincial governments in implementation of NAP is crucial and it is imperative for all to work with missionary zeal," it said.
The meeting agreed on the future course of action in terms of milestones and timelines for different components of NAP.
It was also agreed to further improve the collection, collation, analysis and use of intelligence input for defeating the designs of "enemies".
"We are fighting the war on terrorism and our fight against violent extremism is a national policy imperative," the statement said, underlining that "the nation expects us to rid the society of these evils for all times and we will not fail them under any circumstances".