Ecuadorians were voting Sunday in a referendum that could give their center-right president greater powers to combat drug-related gang violence and gauge how he would fare in his bid for reelection next year.

President Daniel Noboa, the 36-year-old heir to a banana empire, took office in November after an election season focused on drug-related gang violence, which has surged over the past five years to levels not seen in decades.

In January, he declared an “internal armed conflict” and directed the military to “neutralize” the country’s two dozen gangs, which the government labeled “terrorist organizations.” The drastic move allowed soldiers to patrol the streets and prisons, many of which have come under gang control.

Two weeks ago, Noboa took the extraordinary step of arresting an Ecuadorian politician facing a prison sentence who had taken refuge at the Mexican Embassy in Quito, in what experts called a violation of an international treaty on the sanctity of diplomatic posts.

The move drew widespread condemnation across the region.

Noboa defended the embassy raid, saying the politician, a former vice president, was not entitled to protection because he was a convicted criminal.

Taken together, the deployment of the military and the forceful arrest of the former vice president were meant to show that Noboa is tough on crime and impunity, political analysts say. The vote Sunday will gauge how strongly voters support his aggressive stance.

While Noboa has high approval ratings, some human rights groups have criticized his government’s harsh response as going too far and leading to abuses of people in prison and civilians in the streets.

Still, most Ecuadorians are willing to trade off Noboa’s stringent tactics if it makes them less likely to become victims of crime, experts said.

“Noboa is now one of the most popular presidents in the region,” said Glaeldys González, who researches Ecuador for the International Crisis Group, a nonprofit think tank. “He is taking advantage of those levels of popularity that he currently has to catapult himself to the presidential elections.”

The referendum includes 11 questions, eight of which are related to security.

The security measures would enshrine the increased military presence into law, lengthen prison sentences for certain offenses linked to organized crime and allow the extradition of criminals convicted in Ecuador, among other changes.

A flood of violence from international criminal groups and local gangs has turned the country of 17 million into a key player in the global drug trade. Tens of thousands of Ecuadorians have fled to the U.S.-Mexico border.

In early January, the large coastal city of Guayaquil saw a turning point in the long-running security crisis: Gangs attacked the city after authorities moved to take charge of Ecuador’s prisons.

Noboa declared the state of internal conflict in response, and his combative strategy initially reduced violence and brought a precarious sense of safety. But the stability did not last. Over the Easter holiday this month, there were 137 homicides in Ecuador, and kidnappings and extortion have been increasing.

Noboa said he sent police officers into the Mexican Embassy to arrest Jorge Glas, the former vice president who had been sentenced to prison for corruption, because Mexico had abused the immunities and privileges granted to the diplomatic mission.

But the move also sent a message in line with Noboa’s heavy-handed approach to violence and graft.

Even as polls show that his approval rating has fallen in recent months, it still stands at 74%. Most analysts expect Ecuadorians to approve the security questions on the ballot.

“There really is an overwhelming support,” González said. “I would think that all of them are going to have a strong support for the ‘yes.’ ”