Since Ecuador’s president declared war on gangs last month, soldiers with assault rifles have flooded the streets of Guayaquil, a sprawling Pacific coast city that has been an epicenter of the nation’s yearslong descent into violence.

They pull men from buses and cars looking for drugs, weapons and gang tattoos, and patrol roads enforcing a nighttime curfew. The city is on edge, its men and teenage boys potential targets for troops and police officers who have been ordered to take down powerful gangs that have joined forces with international cartels to make Ecuador a hub of the global drug trade.

Yet when people see soldiers pass, many clap or give them a thumbs-up. "We applaud the iron fist; we celebrate it,” Guayaquil Mayor Aquiles Álvarez said. "It has helped bring peace.”