The Supreme Court upheld yesterday laws in 25 states that require state policemen to be American citizens.

The 6-to-3 decision was the first in six years to affirm state laws that discriminate against aliens.

In the opinion for the court, Chief Justice Warren E. Burger wrote that "it would be . . . anomalous to conclude that citizens may be subjected to the broad discretionary powers of noncitizen police officers" who "very clearly" join in executing "broad public policy."

The case rests on the command in the 14th Amendment of the Constitution that no state "deny to any person within its jurisdiction the equal protection of the laws."

The court ruled in 1886 that an alien is a person within the meaning of the amendment. It ruled in 1971 that because aliens are a "discrete and insular minority," laws singling them out for unequal treatment are inherently suspect and "subject to strict judicial scrutiny."

Then, in four decisions in the years 1972 through 1977, the court invalidated state laws disadvantaging aliens in the granting of educational benefits, in eligibility for public employment, and in practicing licensed professions, including law.

In 1973, an Irish citizen named Edmund Foley came to the United state to become a permanent resident. In 1975, he applied to join the New York State Police.

Citing a 1927 law requiring a troper to be an American citizen, the police rejected Foley, who would be a naturalized citizen today but for a waiting period required by Congress.

Foley sued, lost, and yesterday, lost again.

Police fulfill "a most fundamental obligation of government," Burger wrote. They "exercise an almost infinite variety of discretionary powers" even if they "do not formulate policy." As a result, a law such as New York's need not "clear the high hurdle of 'strict scrutiny' . . ."

Two dissidents rejected the majority view that troopers execute "broad public policy" and therefore can't be aliens.

Rather, wrote Justice Thurgood Marshall, an officer applies "the basic policy choices - which he has no role in shaping - to the facts" in any particular situation.

Justice John Paul Stevens, protesting the majority's "misapprehersion" of the role of police in a democracy, said that respect for both law enforcers and the military "should not cause us to lose sight of the fact . . . neither the constabulary nor the military is vested with broad policy-making responsibility."

He also questioned the wisdom of a law that may deny police "the services of Hercule Poirot or Sherlock Holmes."

Stevens joined in Marshall's dissent. Justice William J. Brennan Jr. joined in both dissents.

In joining the majority, Justice Potter Stewart said he has "become increasingly doubtful" about pro-alien decisions in "some of which I concurred."