The Supreme Court ruled 5 to 4 yesterday that the Environmental Protection Agency may allow individual industrial plants to dump greater amounts of toxic wastes into the nation's waterways than national antipollution regulations permit.

The dispute involved EPA's powers under the 1977 Clean Water Act, which required the agency to set nationwide standards for the amount of pollutants that industries may dump into sewer systems or into rivers and lakes.

The ruling written by Justice Byron R. White was a major victory for the chemical industry, which had argued that national standards must take into account individual plant differences.

The chemical industry, joined by the EPA, said Congress intended to allow the agency to grant variances when an individual polluter, for cost or other reasons, could not meet the general industry standard.

The Natural Resources Defense Council, an environmental group, had argued that while Congress allowed exemptions for some pollutants, the act prohibited variances for toxic wastes.

White, in announcing the opinion yesterday, said "we are closely divided" on the issue. But he said the court, after reviewing the "somewhat impenetrable legislative history" of the clean water law, concluded that EPA's "sensible variance mechanism" was not forbidden by Congress.

In a 17-page opinion, White said the EPA was entitled to "considerable deference" in its interpretation of the law, and the court should not substitute its own judgment.

A handful of variances have been granted since 1977, but yesterday environmentalists said they are concerned that more would be granted to the nation's 4,000 major industrial polluters now that the high court had sanctioned EPA's approach.

"If Congress doesn't act, it could mean more toxic wastes into treatment plants and into our water systems," Sierra Club spokesman Daniel Weiss said. "Once you start granting individual exemptions, you start weakening the nation's clean water laws."

But Theodore L. Garrett, an attorney for the Chemical Manufacturers Association Inc., said the decision was essential to the industry and the EPA. "We need some kind of adjustment mechanism so that someone faced with an impossible situation can get some relief from the national regulations."

The EPA could set acceptable pollution levels on an industry-by-industry basis, Garrett said, but some facilities might be very different from others and might find it impossible or prohibitively expensive to comply with EPA requirements.

"This decision is not envisioned by industry as a giant loophole," Garrett said. The decision would provide a "limited safety valve." Garrett said the decision might generate more requests for variances, but said he would "not expect a floodgate."

The case created an unusual split on the court, with liberal Justice William J. Brennan Jr. joining White, Chief Justice Warren E. Burger and Justices Lewis F. Powell Jr. and William H. Rehnquist in the majority.

Justice Thurgood Marshall issued a 31-page dissent, saying the majority was deferring to the EPA's interpretation of the 1977 law "even though that interpretation is inconsistent with the clear intent of Congress, as evidenced by the statutory language, history, structure and purpose."

The usually conservative Justice Sandra Day O'Connor joined most of Marshall's dissent. Justices Harry A. Blackmun and John Paul Stevens also joined Marshall.