NEW DELHI (Reuters) - India s foreign minister defended the country s ties with North Korea and Iran during talks on Wednesday with Secretary of State Rex Tillerson aimed at building robust relations between the two giant democracies. The Trump administration has launched a new U.S. effort to deepen military and economic ties with India as a way to balance China s assertive posture across Asia.   At the talks with Indian Foreign Minister Sushma Swaraj, both sides pledged to strengthen anti-terrorism cooperation and Tillerson said Washington stood ready to provide India with advanced military technology.   The United States supports India s emergence as a leading power and will continue to contribute to Indian capabilities to provide security throughout the region,  Tillerson told a joint news conference with Swaraj.  But the talks also touched on India s diplomatic ties with North Korea, Swaraj said, at a time when the United States has stepped up efforts to isolate Pyongyang over its nuclear and missile programs. Swaraj said she told the top U.S. diplomat that some level of diplomatic presence was necessary to keep open channels of communication.   As far as the question of embassy goes, our embassy there is very small, but there is in fact an embassy,  she said.  I told Secretary Tillerson that some of their friendly countries should maintain embassies there so that some channels of communication are kept open.  India and North Korea maintain diplomatic offices in each other s capitals, though New Delhi recently banned trade of most goods with the country, except food and medicine. Trade was minimal, Swaraj said. The focus on North Korea comes as U.S. President Donald Trump heads to China next month, where he is expected to urge President Xi Jinping to make good on his commitments to try to rein in North Korea. Tillerson, who flew in from Pakistan which he called an important U.S. ally in the restive region, also held talks with Prime Minister Narendra Modi who is driving closer ties with the United States. But India, a former leading light of the Non-Aligned Movement and which was on the opposite side of the United States during the Cold War, still remains wary of any alliances with major powers lest it affect its autonomy. India has also maintained ties with Iran which is being targeted by the Trump administration for its alleged military support of extremist groups in the Middle East and for its ballistic missile programme. India has long sourced its oil from Iran, but in recent years the two sides have been also collaborating on key infrastructure projects.  New Delhi is pushing hard for the development of Chabahar port on the Iranian coast as a hub for its trade links to the resource-rich countries of central Asia and Afghanistan but the Trump administration s tough stance has raised new concerns over the future of that project.   But Tillerson struck a conciliatory stance on India s ties with Iran, saying it wouldn t come in the way of countries doing legitimate business there.   It is not our objective to harm the Iranian people nor is it our objective to interfere with legitimate business activities that are going on with other businesses, whether they be from Europe, India or agreements that are in place or promote economic development and activity to the benefit of our friends and allies,  he said.  America s disagreements were with the Iranian regime, and in particular the Iran Revolutionary Guard, he said.  India is especially keen on the Chabahar port as a way to bypass long-time foe Pakistan which does not allow easy trade and transit arrangements to Afghanistan and beyond. Tillerson said the U.S. stood should-to-shoulder with India in the fight against terrorism which New Delhi has long said is centered in militant groups operating from inside Pakistan.  He said militant groups were a threat to everyone in the region, including Pakistan itself.  Quite frankly my view - and I expressed this to the leadership of Pakistan - is we also are concerned about the stability and security of Pakistan s government as well.  The United States has been urging Pakistan to act against the groups that operate in Afghanistan, India and inside Pakistan itself.  Terrorist safe havens will not be tolerated,  Tillerson said. Pakistan says it is doing all it can to fight the militants.  