US President Barack Obama said today that Pakistan " can and must " take more effective action against terror groups operating from its soil. Delivering a strong message to Pakistan in an interview to the Press Trust of India, President Obama said the country must "delegitimize, disrupt and dismantle" terror networks on its soil President Obama described the January 2 terror attack on the Pathankot air base as "another example of the inexcusable terrorism that India has endured for too long." He also gave credit to Prime Minister Narendra Modi for reaching out to his Pakistani counterpart Nawaz Sharif after the attack. "Both leaders are advancing a dialogue on how to confront violent extremism and terrorism across the region," said the US president. Saying that the Indo-US relationship can be one of the defining partnerships of the century, he said that PM Modi shared his enthusiasm for a strong partnership and "we have developed a friendship and close working relationship, including our conversations on the new secure lines between our offices." Asked if the relationship has achieved its full potential, the President replied, "Absolutely not." On the Pathankot attack, Obama said: "Tragedies like this underscore why the US and India continue to be such close partners in fighting terrorism." He said Nawaz Sharif recognized that insecurity in Pakistan is a threat to its own stability and that of the region. After the December 2014 school massacre in Peshawar, Sharif had vowed to target all terrorists regardless of their agenda or affiliation. "That is the right policy. Since then, we have seen Pakistan take action against several specific groups. We have also seen continued terrorism inside Pakistan such as the recent attack on the university in north west Pakistan," he said. Referring to India, President Obama said his visit last year reflected how ties have transformed. He said he believed "the relationship between India and the US can be one of the defining partnerships of this century." He said his hope was that his visit could help spark a new era of cooperation between the two countries and "I believe it did". President Obama said the two countries were doing even more as global partners including more military exercises, greater cooperation in the Asia Pacific and Indian Ocean region and working together to confront climate change. "I continue to believe that America can be India's best partner. So I hope future generations can look back at this moment and see that this was the time when the world's largest democracies became true global partners. In my final year as President, continuing to deepen our ties will continue to be one of my foreign policy priorities," Mr Obama said.