TOKYO—Japanese Prime Minister Shinzo Abe said Sunday the attack in Dhaka, Bangladesh that killed seven of its citizens was an “unforgivable act of terror.”

“I feel strong outrage,” Mr. Abe said. “Together with the international community, we must make a solid contribution to eradicate terrorism like this.”

Government officials have used Japanese...