The Environmental Protection Agency yesterday ordered gasoline refiners to remove more than 90 percent of the lead in leaded gasoline by the end of the year, and said it might ban lead altogether by 1988 in light of new evidence that the substance causes high blood pressure.

"There is no doubt in my mind that lead in the environment is a major public health problem and that gasoline is a major contributor to that problem," said EPA Administrator Lee M. Thomas.

Thomas acknowledged that the decision is likely to mean higher prices for leaded gasoline, but he discounted industry arguments that the change will result in spot fuel shortages this summer.

The first step of the reduction is to take effect July 1, unless challenged in court.

Production costs for less heavily leaded gasoline, which will need additional refining to make up the octane the lead once supplied, will increase by about 2 cents a gallon, Thomas said, but "how that translates into pump price is hard to say."

The EPA faced strong opposition from industry groups in announcing its final standards, which are identical to those it proposed last August after determining that even low levels of lead in the blood can cause brain damage and reduce intelligence in children.

The agency estimates that 80 percent of the lead in the air comes from leaded gasoline.

But the agency's announcement that it was strongly considering an outright ban within three years came as a surprise.

Until yesterday, EPA officials had been suggesting 1995 as a target date for such a ban.

The EPA's heightened interest in banning lead stems from two recently published studies that found a "strong statistical relationship" between blood lead and blood pressure.

The studies showed a stronger correlation for white males between age 40 and 59 than for younger males or for women.

Thomas and other EPA officials emphasized yesterday that their decision to reduce lead levels does not rely on that new data, which has not been subjected to extensive scientific review.

But, using the data in the new studies, the agency estimated that reducing lead by 90 percent could prevent 1.8 million cases of high blood pressure among middle-aged white men in 1986 alone, as well as 5,000 heart attacks and more than 1,000 strokes.

Presumably the health benefits would be proportionally higher for blacks, who have higher rates of hypertension and are more likely to live in traffic-congested urban areas where airborne lead levels are highest.

The EPA said it limited its estimates to white males because the studies included few nonwhites.

The EPA has been reluctant to propose a ban on leaded gasoline because of arguments that some older, heavy-duty automobile engines require small amounts of lead as a valve lubricant.

Thomas said the agency was reconsidering that position, because recent studies indicate that lead is not critical to reducing engine wear.

Moreover, Thomas said, the agency was concerned that even its tough new lead standard will not halt the problem of fuel switching, which is on the increase as motorists attempt to take advantage of the 7- to 10-cent lower price for a gallon of leaded fuel.

The EPA's most recent survey showed that 16 percent of vehicles designed to take unleaded gas were fueled illegally with leaded gas. The practice damages catalytic converters, increases automobile pollution and results in higher maintenance bills, according to the EPA.

"These facts suggest that a ban on lead in the near term might be both desirable and feasible," Thomas said.

The agency's announcement yesterday represents a 180-degree turn from the Reagan administration's initial position on leaded gasoline.

In early 1982, former administrator Anne M. Burford proposed to relax or rescind federal lead standards, arguing that the marketplace would take care of the problem as cars designed to run on unleaded fuel gradually replaced older vehicles.

The proposal drew an outcry from public health officials, however, and the EPA reversed itself in late 1982, issuing a tougher standard that permitted no more than 1.1 grams of lead in a gallon of gasoline.

The old standard was .5 grams per gallon, but refiners were allowed to average lead content over all the gasoline they produced.

As more unleaded gasoline was produced, the lead content in leaded gasoline was edging upward.

"Lead is the cheapest way to get octane up and refiners will use as much as they can as long as they can for that reason," Richard D. Wilson, director of the EPA's office of mobile sources, said yesterday.

EPA officials quickly determined that the 1982 standard wasn't performing as advertised, however, largely because of fuel switching.

As a result, the EPA proposed last August to ratchet lead levels down further.

That decision, which became final yesterday, orders refiners to reduce lead to no more than .5 grams by July 1 and to no more than .1 grams by Jan. 1, 1986.