A control room of camera feeds and workers, part of Ecuador's Emergency Response System, in Ecuador in 2018. Cameras across the country send footage to monitoring centers like this one to be examined by police and domestic intelligence. The surveillance system’s origin: China. Jonah Kessel/The New York Times

QUITO, Ecuador — The squat gray building in Ecuador’s capital commands a sweeping view of the city’s sparkling sprawl, from the high-rises at the base of the Andean valley to the pastel neighborhoods that spill up its mountainsides.

The police who work inside are looking elsewhere. They spend their days poring over computer screens, watching footage that comes in from 4,300 cameras across the country.

The high-powered cameras send what they see to 16 monitoring centers in Ecuador that employ more than 3,000 people. Armed with joysticks, the police control the cameras and scan the streets for drug deals, muggings and killings. If they spy something, they zoom in.

This voyeur’s paradise is made with technology from what is fast becoming the global capital of surveillance: China.

Ecuador’s system, which was installed beginning in 2011, is a basic version of a program of computerized controls that Beijing has spent billions to build out over a decade of technological progress. According to Ecuador’s government, these cameras feed footage to the police for manual review.

But a New York Times investigation found that the footage also goes to the country’s feared domestic intelligence agency, which under the previous president, Rafael Correa, had a lengthy track record of following, intimidating and attacking political opponents. Even as a new administration under President Lenín Moreno investigates the agency’s abuses, the group still gets the videos.

Under President Xi Jinping, the Chinese government has vastly expanded domestic surveillance, fueling a new generation of companies that make sophisticated technology at ever lower prices. A global infrastructure initiative is spreading that technology even further.

Ecuador shows how technology built for China’s political system is now being applied — and sometimes abused — by other governments. Today, 18 countries — including Zimbabwe, Uzbekistan, Pakistan, Kenya, the United Arab Emirates and Germany — are using Chinese-made intelligent monitoring systems, and 36 have received training in topics like “public opinion guidance,” which is typically a euphemism for censorship, according to an October report from Freedom House, a pro-democracy research group.

With China’s surveillance know-how and equipment now flowing to the world, critics warn that it could help underpin a future of tech-driven authoritarianism, potentially leading to a loss of privacy on an industrial scale. Often described as public security systems, the technologies have darker potential uses as tools of political repression.

“They’re selling this as the future of governance; the future will be all about controlling the masses through technology,” Adrian Shahbaz, research director at Freedom House, said of China’s new tech exports.

Companies worldwide provide the components and code of dystopian digital surveillance and democratic nations like Britain and the United States also have ways of watching their citizens. But China’s growing market dominance has changed things. Loans from Beijing have made surveillance technology available to governments that could not previously afford it, while China’s authoritarian system has diminished the transparency and accountability of its use.

For locals seeking to push back, there is little recourse. Chinese companies operate with less scrutiny and regard for corporate social responsibility than their Western counterparts. Activists in Ecuador say that while they have succeeded in working with civil society groups in Europe and the United States to oppose sales of surveillance technologies, similar campaigns in China have not been possible.

“We don’t have the capacity to demand information from China — it’s really difficult,” said former Ecuadorean legislator Martha Roldós.

Ecuador’s system, called ECU-911, was largely made by two Chinese companies, the state-controlled CEIEC and Huawei.

Replicas of the network have been sold to Venezuela, Bolivia and Angola, according to government announcements and Chinese state media.

CEIEC and China’s Ministry of Foreign Affairs did not respond to requests for comment.

In a statement, Huawei said: “Huawei provides technology to support smart city and safe city programs across the world. In each case, Huawei does not get involved in setting public policy in terms of how that technology is used.”

In Ecuador, the cameras that are part of ECU-911 hang from poles and rooftops, from the Galápagos Islands to the Amazonian jungle. The system lets authorities track phones and may soon get facial-recognition capabilities. Recordings allow the police to review and reconstruct past incidents.

While ECU-911 was sold to the public as a way to get a grip on dizzying murder rates and drug-related petty crime, it also served Correa’s authoritarian streak, supporting his feared National Intelligence Secretariat, or SENAIN, according to a former head of the group. In a rare interview last year at SENAIN’s headquarters in a bunker outside Quito, its leader at the time, Jorge Costa, confirmed that the domestic intelligence group had access to a mirror of the Chinese-built surveillance system.

The irony is that ECU-911 has not been effective at stopping crime, many Ecuadoreans said, though the system’s installation paralleled a period of falling crime rates. Ecuadoreans cite muggings and attacks that happened in front of the cameras without police response. Still, police have built public support, partly by releasing clips on Twitter and television of thieves and muggers caught on camera.

Left to choose between privacy and safety, many Ecuadoreans opt for the unblinking gaze of the electronic eyes. With the mass surveillance genie out of the bottle, community leaders have called for cameras to help secure their neighborhoods, even when their own experiences are that the devices do not work well. Concerns about the long-term political implications trail behind the pressing realities of violence and drugs.

Moreno, who came to power in 2017 and has walked back some of Correa’s autocratic policies, has vowed to investigate SENAIN’s abuses and is remaking the intelligence collection agency under a new name. His government helped open up ECU-911 and SENAIN to The Times.

“The government viewed espionage as a toolbox, and they could use any tool they wanted,” Roldós said. “They could spy on your emails, your phone calls, they would set microphones on your vehicle. At the same time, you had people following you. It was a whole system.”

DESIGNED BY CHINA, FINANCED BY CHINA

Cameras on a street in Ecuador in 2018. Cameras across the country send footage to monitoring centers to be examined by police and domestic intelligence. The surveillance system’s origin: China. Jonah Kessel/The New York Times

For a system that was supposed to fight drug dealers and killers, ECU-911 traces its origins to a different security challenge: the 2008 Olympics.

Before those games, a delegation from Ecuador visited Beijing and toured the Chinese capital’s surveillance system. At the time, Beijing was pulling footage from 300,000 cameras to keep tabs on 17 million people. The Ecuadoreans left impressed.

“For the Olympics, China developed emergency response centers which had state-of-the-art technology for its time,” Francisco Robayo, then the general director of ECU-911, said in an interview last year. “Our authorities saw these as ideal to bring to Ecuador.”

The timing was fortuitous. Correa was newly in power and facing high crime rates. In January 2011, he made surveillance a priority.

Correa’s ministers turned to China. In two months, details to install a Chinese-made technology system were ironed out with the help of military attachés from the Chinese Embassy in Quito, according to a person familiar with the process and to publicly available documents from Ecuador’s comptroller. Ecuadorean officials traveled again to Beijing to scope out the system, which featured technology made by the parent company of the state-backed CEIEC.

By February 2011, with guarantees of state funding from the attachés, Ecuador signed a deal with no public bidding process. The country got a Chinese-designed surveillance system financed by Chinese loans. In exchange, Ecuador provided one of its main exports, oil. The money for the cameras and computing flowed straight to CEIEC and Huawei.

“The money always ends up going back to China,” Roldós said.

It became a pattern. In exchange for credit facilities that totaled more than $19 billion, Ecuador signed away large portions of its oil reserves. A surge of Chinese-built infrastructure projects, including hydroelectric dams and refineries, followed.

By comparison, ECU-911 was a small line item.

With an initial sticker price of more than $200 million, construction started near Guayaquil, a booming coastal city where crime rates are high, Robayo said. Over the next four years, the system expanded across Ecuador.

Cameras were hung anywhere that provided a good view. Operation centers were set up. Top Ecuadorean officials traveled to China for training, and Chinese engineers visited to teach their Ecuadorean counterparts how to work the system.

The activity attracted attention from Ecuador’s neighbors. Venezuelan officials came to see the system, according to a 2013 account from an Ecuadorean official working on the project. In an effort led by the onetime head of intelligence for Hugo Chávez, Venezuela then sprang for a larger version of the system, with a goal of adding 30,000 cameras. Bolivia followed.

Beijing’s ambitions go much further than the abilities those countries bought. Today, the police across China gather material from tens of millions of cameras, and billions of records of travel, internet use and business activities, to keep tabs on citizens. The national watch list of would-be criminals and potential political agitators includes 20 million to 30 million people — more than Ecuador’s population of 16 million.

Chinese startups, backed in part by American investment, are competing to build methods for automated policing. They create algorithms that look for suspicious patterns in social media use and computer-vision software to track minorities and petitioners across cities. The spending spree has driven down prices for all types of policing gadgets, as varied as identity-card checkers and high-resolution security cameras.

In China, Ecuador’s project received praise. State media held it up as an example of a new China exporting advanced technology, instead of providing low-cost labor to assemble it.

In 2016, when Xi visited Ecuador, he stopped by ECU-911 headquarters. Robayo said Xi had shown up for about five minutes, enough time for photo opportunities. The snapshots went up on CEIEC’s website, a sign of official support from the most powerful Chinese leader in a generation.

A ZOOM WITH A VIEW

To the government of Correa, Mario Pazmiño was a known man.

A retired Ecuadorean army colonel who adopted stray dogs — more than a dozen — to keep himself busy in the twilight of his career, Pazmiño kept up another pet hobby: criticizing the government of Correa.

He complained about police corruption. He argued that Correa’s government was complicit in Ecuador’s growing drug trade. He called out what he perceived as the administration’s incompetence.

Pazmiño’s efforts earned him his own retinue of secret police. They set up in an apartment across from his house and followed him when he went out.

Just as Chávez had done in Venezuela, Correa tightened the reins in Ecuador. He eliminated presidential term limits, intimidated and ejected judges, and sent henchmen to follow and attack political opponents and activists, like Pazmiño and Roldós.

His government also turned to ECU-911.

“I think few people know about it or are actually aware of the huge power of ECU-911,” Roldós said. “There are few people who really know the extent of the tracking.” She added that SENAIN used just about any technology it could get its hands on to harass and follow Correa’s political opponents.

A seasoned intelligence officer, Pazmiño, 59, said even he was surprised when, in 2013, a video camera that was part of ECU-911 was installed directly outside his house. It hung from a pole on a traffic divider in the middle of the street, with a full view through a window into his second-story apartment.

“There is a direct collaboration between ECU-911, the Intelligence Secretariat and also those who surveil and persecute political or social actors,” said Pazmiño, citing his own experience, as well as documents and people who had worked in SENAIN.

Pazmiño said that after the camera went in, surveillance teams following him backed off. The camera otherwise made no real sense where it was. Pazmiño lives in a relatively safe neighborhood and no other ECU-911 cameras were installed nearby. It was a move out of the police playbook in China, where cameras are positioned outside the doors of high-profile activists.

A visit to SENAIN’s headquarters confirmed Pazmiño’s suspicion. On a wall of screens that served as a sort of agency control room, Times reporters recognized footage from the ECU-911 system.

Costa, who was in charge of the transition between SENAIN and its successor, acknowledged the transmissions — but said he was not responsible for how they had been used in Correa’s administration.

Pazmiño said he had an idea of who should be held accountable: China. He said the country had supported and emboldened Correa, just as it had leaders in neighboring Venezuela. As conditions deteriorated in Venezuela last year, Huawei engineers helped train Venezuelan engineers on how to maintain their version of Ecuador’s system.

“I believe what the Chinese model generates is control over society,” he said. “A rigid control.”

THE LIMITS OF SURVEILLANCE

El Tejar has some of the best views in Quito — and some of its worst crime.

As Lidia Rueda, a community organizer, walked the steep, winding streets of this neighborhood, where she has lived for 30 years, she pointed down the hill to where the bodies of several killed women were found. Drug dealers come and go with impunity, she said. Muggings are common. Thieves break streetlights to get the cover of darkness.

The crime has not subsided even though ECU-911 cameras arrived at the base of the hill several years ago. Rueda gestured to a pedestrian bridge there, where one man had grabbed her and threatened her with a knife while another had taken her money. The 2014 mugging happened directly beneath a police camera. No help came.

Rueda’s experience encapsulates the complex relationship many Ecuadoreans have with the cameras. While authorities said the cameras had reduced crime, anecdotes of its dysfunction abound.

“Where there are cameras, they often don’t work,” said Rueda, 61. Another possibility was simply that no one was watching.

The odds are against Ecuador’s police force. Quito has more than 800 cameras. But during a Times visit, 30 police officers were on duty to check the footage. In their gray building atop the hill, officers spend a few minutes looking at footage from one camera and then switch. Preventing crime is only part of the job. In a control room, dispatchers supported responses to emergency calls.

Most of the time, no one was on the other side of the lens.

It was a reminder that the system, and others like it, are more easily used for snooping than crime prevention. Following someone on the streets requires a small team, while large numbers of well-coordinated police are necessary to stop crime.

Robayo argued that ECU-911 had been responsible for a major drop in killings and an almost 13% drop in crime in 2018 from the previous year. The mere existence of a camera can also have a profound effect, he said.

Many Ecuadoreans agree. Despite Rueda’s mugging, she has called for the installation of more cameras in El Tejar. The best way to fix the neighborhood’s crime problems is to fix the surveillance system, she said.

The police have told her that the cameras are too expensive for her neighborhood. To that, Rueda took a fatalistic view.

“It is always the same problem, a budget shortage,” she said. “Only when someone is killed, then the authorities come and say, ‘Now we’re going to do it.’”