WASHINGTON — Secretary of State John Kerry called on Bangladesh’s leader to step up law enforcement to prevent a wave of killings targeting liberal voices, the State Department said Friday amid fears that the traditionally moderate South Asian nation is under threat from Islamic extremists.

Kerry called Prime Minister Sheikh Hasina on Thursday and offered U.S. support for the investigation into the slaying of Xulhaz Mannan, a U.S. Agency for International Development employee and gay rights activist, and Tonmoi Mahbub, a theater actor.

Their killings were the latest in spate of bloody attacks on secular writers, bloggers, foreigners and religious minorities that began in 2013 but have intensified in the past year. Hasina’s government has blamed the political opposition for the attacks although al-Qaida and the Islamic State group have been claiming responsibility.

“The secretary urged Prime Minister Hasina to ensure a thorough investigation of all of these incidents, and to redouble law enforcement efforts to prevent future attacks and protect those who are at risk,” the department said in a statement.

While authorities have arrested suspects in some cases, none have been prosecuted, and authorities have yet to identify the masterminds.

The assaults have typically been perpetrated by young men wielding knives or machetes and spewing hateful language. Among the fatalities was Bangladeshi-American writer Avijit Roy, who was attacked on a street in the capital, Dhaka, in February 2015.

Human rights groups fear for others facing militant death threats as the Bangladeshi government has appeared unsympathetic to their plight. The U.S. says it is considering providing sanctuary to some individuals at risk, although it remains unclear whether that will happen. Human rights groups have been calling for that since December.

A broader concern for Washington as it struggles to counter IS worldwide is that ambitious local extremists could enable transnational jihadist groups to gain a foothold in Bangladesh despite the nation’s traditions of secularism, free speech and respect for its Christian and Hindu minorities, and its successes in reducing poverty and raising life expectancy among its 160 million people.

The No. 2 U.S. diplomat said Thursday that evidence to date suggests extremist groups, either local or affiliated with IS or al-Qaida, are responsible for the killings. Evidence to date suggests extremist groups, either local or affiliated with IS or al-Qaida, are responsible for the slayings of LGBT activists Xulhaz Mannan and Tonoy Mahbub. “This gives us concern about the potential for ISIL or Daesh to take root in Bangladesh,” Deputy Secretary of State Antony Blinken told the House Foreign Affairs Committee, using alternative acronyms for IS. “That is the last thing we want.”

In February, Director of National Intelligence James Clapper said that Hasina’s efforts to undermine the political opposition “will probably provide openings for transnational terrorist groups to expand their presence in the country.”

Hasina has become the country’s dominant force, marginalizing the main opposition Bangladesh Nationalist Party, or BNP, which boycotted the last national elections held in 2014. She has pursued war crimes prosecutions leading to death penalties for several leaders of the fundamentalist Jamaat-e-Islami party, which is allied to the BNP, over alleged involvement in atrocities committed during its 1971 war of independence, when Bangladesh separated from Pakistan.

The opposition denies involvement in the attacks and says it is being scapegoated for security failings.

Ansar al-Islam, an affiliate of al-Qaida on the Indian subcontinent, said it had killed Mannan and Mahbub because they were “pioneers of practicing and promoting homosexuality.” That claim of responsibility has not been verified.

U.S. officials say they cooperate well with Bangladesh on counterterrorism and intelligence-sharing, and that despite Bangladeshi denials of the involvement of transnational jihadist groups, in recent months, U.S. and Bangladeshi officials have discussed how to alleviate the risk of those groups establishing themselves in the South Asian country.

Both al-Qaida and IS have made clear they want to assert themselves in Bangladesh.

In 2014, al-Qaida leader Ayman al-Zawahri issued a call for jihad there, and Bangladesh has been a focus of recent articles in the Islamic State group’s online magazine, Dabiq.

This month’s edition includes an interview with the purported leader of IS fighters in Bangladesh, Sheikh Abu Ibrahim al-Hanif, who says Bangladesh has a “strategic geographic position” for global jihad. He says a strong base there will facilitate guerrilla attacks inside India, and provide a “stepping stone” for jihad in Myanmar.