WASHINGTON — A federal appeals court on Wednesday ordered the Environmental Protection Agency to revise its nearly 17-year-old standard for dangerous levels of lead in paint and dust within one year, a rare legal move that amounts to a sharp rebuff of President Trump and Scott Pruitt, the E.P.A. administrator.

The decision also called attention to the persistent threat of lead paint to children in millions of American homes, four decades after the federal government banned it from households.

“This is going to protect the brains of thousands of children across the country,” said Eve C. Gartner, a staff attorney for Earthjustice who helped argue the case on behalf of groups pushing for tougher standards. “It’s going to mean that children that otherwise would have developed very elevated blood lead levels will be protected from the damage associated with that, assuming E.P.A. follows the court order,” she said.

The 2-to-1 decision, by the United States Court of Appeals for the Ninth Circuit, in San Francisco, means the E.P.A. must propose a new rule within 90 days, instead of the six years the Trump administration had requested to reconsider what levels of lead exposure are acceptable for children.