The Wi-Fi kiosks in New York were designed to replace phone booths and allow users to consult maps, maybe check the weather or charge their phones. But they have also attracted people who linger for hours, sometimes drinking and doing drugs and, at times, boldly watching pornography on the sidewalks.

Now, yielding to complaints, the operator of the kiosks, LinkNYC network, is shutting off their internet browsers, but not their other functions, while it works out a Plan B with city officials.

The switch, announced on Wednesday, is a case study in unintended consequences, commendable goals gone somewhat awry. Mayor Bill de Blasio’s aim of providing modern technology to the masses ran headlong into the reality of life on the city’s streets. After months of complaints from residents, businesses and other elected officials, Mr. de Blasio, a Democrat, conceded that combining unfettered internet access with free Wi-Fi was a recipe for bad behavior.

The retreat comes just seven months after the mayor introduced the network amid much fanfare as a key plank of his promise to bridge the digital divide in the city. The kiosks would replace more than 7,500 public pay phones and bring free Wi-Fi and phone service to every neighborhood.