NEW DELHI — U.S. Secretary of State John Kerry called Monday for Bangladesh to step up efforts to fight extremist violence, come to terms with links between local and international militants and protect and promote human rights.

Kerry made his first trip to Bangladesh as America’s top diplomat amid increasing concern about terrorism in the South Asian nation after of a series of militant attacks.

On a brief stop in Dhaka before a two-day visit to New Delhi, Kerry met with Prime Minister Sheikh Hasina and Foreign Minister Abdul Hassam Mahmood Ali, opposition officials and students. In each session, he made the point that Bangladesh must deal with the roots of the attacks, the most recent of which killed 20 people, including 17 foreigners, at a popular restaurant last month in the capital.

The Islamic State group has claimed responsibility for that attack, but Bangladeshi authorities maintain that IS has no presence in the country and that a banned local group, Jumatul Mujahedeen Bangladesh, or JMB, was behind it. Some have accused Bangladesh of turning a blind eye to the possibility of outsiders radicalizing elements of the Muslim-majority nation.

Kerry said he does not believe “the government of Bangladesh has its head in the sand.” But he also made the point that there are links between the Islamic State and extremists around the world, including in Bangladesh.

“There is evidence that ISIL in Iraq and Syria has contacts with about eight different entities around the world, and one of them is in South Asia,” Kerry told reporters in a news conference in Dhaka. “And they are connected to some degree with some of the operatives here, and we made that very clear in our conversation.”

Kerry spoke pointedly of the transnational threat posed by terrorism. The July 1 attack on Dhaka’s Holey Artisan Bakery “was an outrage clearly designed to divide Bangladesh, designed to try to cut off this welcoming society from the outside world,” he said.

“These heinous acts of violence — and too many others worldwide — are a stark, painful reminder that those who aid terrorist groups or perpetrate these acts have no respect for national boundaries, no concern for the rights of others, no regard for the rule of law,” he said. Kerry said a longstanding counterterrorism dialogue has intensified in recent months and work with the Bangladeshi police and military will continue with an eye toward further cooperation.

On Saturday, police said they had killed three suspected militants, including an alleged mastermind of the cafe attack. But many of the perpetrators of a string of attacks over the past two years that have killed atheist bloggers, foreign aid workers and religious minorities remain at large.

Kerry urged the government of Bangladesh to resist the temptation to shut down public debate or stifle opposition groups as a way to combat the threat.

“Democracy,” he said, “still provides the most resilient and reliable platform we have for preventing and responding to violent extremism … to defeat terrorists, we must uphold, not betray, the democratic principles we cherish and they abhor.”

After his brief stop in Bangladesh, Kerry traveled to India for the seventh meeting of the U.S.-India strategic dialogue, which seeks to improve security and well as economic and development ties between the nations.

This year’s discussions are taking place as tensions rise in the disputed region of Kashmir, scene of some of the largest protests against Indian rule in recent years. Since early July, at least 67 civilians have been killed and thousands injured, mostly by government forces firing bullets and shotguns at rock-throwing protesters. Two policemen have been killed and hundreds of government forces have been injured in the clashes.

On Monday, Indian authorities lifted a curfew imposed in most parts of India-controlled Kashmir as part of a 52-day security lockdown. But they re-imposed the curfew in the region’s main city after anti-India protests and clashes erupted in several neighborhoods.