Honolulu in Hawaii has become the first city in the US to ban people from looking at their phones or other digital devices while crossing roads.
The law, passed in July in an attempt to reduce injuries and deaths that occur while people are distracted, came into force on Wednesday.
First offenders will face fines of up to $15-$35 (£11-£26) while repeat offenders face fines of up to $99.
Urgent calls to the emergency services are exempt from the ban.
The Distracted Walking Law states that "no pedestrian shall cross a street or highway while viewing a mobile electronic device".
The National Safety Council in the US added "distracted walking" to a list of injury risks in 2015, the same year a study in the Journal of Safety Studies found that hundreds of American pedestrians a year were injured while engrossed in their phones.
Other countries have tried to find technological ways of dealing with the problem of "smartphone zombies", from an app that scans the area to warn phone users of oncoming traffic, to pavement lights that change colour with the traffic lights but, crucially, are in the line of sight of someone looking at a phone.
Correction 29 October: This story was amended to clarify that Honolulu was the first US city, not the world's first city, to pass such legislation.