Honolulu has become the first major US city to ban pedestrians from looking at mobile phones, texting or using digital devices while crossing the road.
The measure, which will take effect in Hawaii's largest city in October, is aimed at reducing injuries and deaths from "distracted walking".
First offenders caught gazing at devices, including laptops and digital cameras, face $15-$35 (£11-£26) fines.
Urgent calls to the emergency services are exempt from the ban.
The bill, also known as the Distracted Walking Law, was signed off by the mayor of Honolulu, Kirk Caldwell, on Thursday after the city council approved the measure by a vote of 7-2.
The new legislation, which will come into effect on 25 October, states that "no pedestrian shall cross a street or highway while viewing a mobile electronic device".
Repeat offenders face fines of up to $99.
The new law has met opposition from some members of the public, who accuse the government of over-regulation.
'We lack common sense'
"We hold the unfortunate distinction of being a major city with more pedestrians being hit in crosswalks, particularly our seniors, than almost any other city in the county," Mr Caldwell told Reuters news agency.
"Sometimes I wish there were laws we did not have to pass, that perhaps common sense would prevail, but sometimes we lack common sense," Mr Caldwell said.
Distracted walking incidents involving mobile phones accounted for more than 11,100 injuries in the US between 2000 and 2011, according to the US National Safety Council.
The figures for more recent years, which are not provided in the council's latest report, are likely to be higher.
Have your say
More World Headlines
- Trump attacks Mueller's Russia inquiry as 'absolutely nuts'
- Carmakers lure ride-hailer, delivery drivers in Africa
- White House aide Mira Ricardel removed after Melania Trump row
- Nigeria: Biafra secessionist leader 'must appear in court'
- Lion Air crash: Victim's fiancée takes wedding photos alone
- UK closer to delivering Brexit - May
- UN lifts nine-year Eritrea sanctions
- South Africa minister resigns weeks after sex video scandal
- Brexit: Theresa May to face cabinet showdown over deal
- Trump finally appoints new ambassador to Saudi Arabia
- Over 300,000 Congolese refugees forced to leave Angola
- 10 students die in suspected arson at Ugandan boarding school
- CNN sues Trump, top White House aides for barring Acosta
- California wildfires: Death toll reaches grim milestone
- Final school hostages freed in Cameroon