SAN FRANCISCO — A federal judge on Monday largely turned back a wireless industry challenge to a Berkeley ordinance requiring cellphone retailers to warn customers against storing their devices too close to their bodies.

U.S. District Judge Edward Chen of the Northern District of California ruled that Berkeley’s law does not violate the First Amendment rights of members of CTIA—The Wireless Association, an industry group represented by Gibson, Dunn & Crutcher’s Theodore Olson. Chen, however, did find one sentence of the ordinance that states “the potential risk is greater for children” is likely preempted by federal regulations.