Supreme Court Justice William J. Brennan Jr., a liberal stalwart whose views shaped the direction of the high court for more than three decades, resigned yesterday at age 84, saying the "strenuous demands of court work" were "incompatible with my advancing age and medical condition."

Brennan, who suffered a small stroke a few weeks ago, announced his immediate resignation in a brief letter delivered to President Bush at the White House at 7:40 p.m. In a separate statement, he said he had been confronted with "a very difficult decision" to step down after almost 34 years of service.

"It is my hope that the court during my years of service has built a legacy of interpreting the Constitution and federal laws to make them responsive to the needs of the people whom they were intended to benefit and protect," Brennan said. "This legacy can and will withstand the test of time."

Brennan's departure paves the way for Bush to enlarge the court's slim 5 to 4 conservative majority, shoring up conservative control of the court on such divisive issues as abortion and affirmative action.

Bush, who received a copy of Brennan's letter by fax aboard Air Force One as he was flying to Washington from Cheyenne, Wyo., told reporters aboard the plane that the resignation took him by surprise. He said the process of choosing a successor would begin this morning at a White House meeting, but noted, "I've always said I want somebody who will be on there not to legislate from the bench, but to faithfully interpret the Constitution."

He acknowledged some thought already had been given to a successor. "It's not like we're starting from ground zero," Bush said. White House press secretary Marlin Fitzwater said Bush telephoned Brennan from Air Force One but gave no details of the conversation.

Among those that have been mentioned as possible successors are Solicitor General Kenneth W. Starr, a former judge on the appeals court here; U.S. Trade Representative Carla A. Hills; and an array of appeals court judges, including Edith H. Jones and Patrick E. Higginbotham, both of the 5th U.S. Circuit Court of Appeals; Ralph K. Winter of the 2d Circuit; J. Harvie Wilkinson III of the 4th Circuit; Pamela A. Rymer of the 9th Circuit; and Clarence Thomas of the D.C. Circuit.

Administration officials said the idea of renominating Robert H. Bork, the former federal appeals court judge whose 1987 nomination was defeated 58 to 42 by the Senate, also is under consideration.

Named to the court by President Dwight D. Eisenhower in 1956, Brennan was the driving force of its liberal wing, the hero of liberals throughout the nation and scourge of conservatives who protested what they viewed as his judicial activism. His intellectual power, long tenure and skill at forging coalitions with his fellow justices made him one of the most influential figures in the history of the court.

A diminutive, gregarious man, Brennan had been instructed by his physicians to slow his pace and had canceled a number of speaking engagements and travel plans in recent months and during the court's summer recess.

He told the Associated Press in April that he had no plans to retire and was "still enjoying myself. Nothing possibly could be as satisfying. . . . If I can keep on the way I am, I'm going to stay."

But he also said he had instructed his wife, Mary, to let him know if she thought he was slowing down. "I have a pledge from my wife that the day she notices it she'll tell me, so I'll act accordingly," he said. "I think it would be so wrong to stay here unless you're fully able to do your job. Too much rides on what we do around here."

Supreme Court spokesman Toni House said that Brennan fell and hit his head a few weeks ago at Newark International Airport, as he and his wife were about to depart for a Scandinavian vacation cruise. They continued on their trip, returning several days ago, House said. Brennan then consulted his physician, who said the justice had suffered a small stroke. Brennan was advised to avoid stress and strain, and the physician recommended he consider retiring.

Brennan is the fourth-oldest justice to have sat on the court. Only five justices in its history have served longer. Among those justices remaining on the court, Thurgood Marshall is 82, Harry A. Blackmun is 81, and Byron R. White is 73. The other five are 70 or under.

Brennan was the architect of numerous landmark rulings during the heyday of the Warren Court, including the 1962 ruling giving federal courts power to hear challenges to legislative apportionment; the 1964 New York Times v. Sullivan decision extending constitutional protection to newspapers sued for libel; and a 1970 decision ushering in a new era of "due process" rights for recipients of welfare and other government benefits.

He also wrote decisions establishing rights for illegal aliens, juveniles and criminal suspects; pressing for school desegregation in the North as well as the South, and overturning the constitutionality of New York state's loyalty tests for teachers.

The author of more than 1,200 opinions, Brennan said in a 1986 interview that he could not name his favorite. "It's like you have several children and you're asked what one you are most fond of," he said.

In recent years, Brennan, the oldest of the justices, found the court's dwindling liberal wing outnumbered by conservatives as President Ronald Reagan made appointments to the court, and some of Brennan's most cherished decisions were eroded.

But he mustered a majority for rulings upholding affirmative action programs for women and minorities, striking down large federal and state aid programs for parochial schools and voiding laws requiring that creationism be taught in the public schools.

The 1987 retirement of moderate Justice Lewis F. Powell Jr., a key swing vote on many issues, and his replacement by the staunchly conservative Justice Anthony M. Kennedy, further limited Brennan's ability to win a majority on many issues.

However, even during his final term in office, Brennan scored a number of significant victories. The opinions he wrote last term as the court's senior liberal justice included a ringing reaffirmation of congressional power to enact affirmative action programs; a broad ruling that the First Amendment prohibits most political patronage in hiring or promotion; and a reiteration of the 1989 ruling finding laws against flag burning unconstitutional.

Those cases were decided on 5 to 4 votes, and Brennan's departure leaves the court with three liberals: Marshall, Blackmun, and John Paul Stevens. White has sometimes joined with the liberal faction, particularly in cases involving federal government power, for example, voting this year to uphold the affirmative action policies of the Federal Communications Commission.

Both liberals and conservatives, admirers and detractors, have long agreed on the significance of Brennan's contributions to the court.

"There is no individual in this country, on or off the court, who has had a more profound and sustained impact upon public policy in the United States for the past 27 years," the conservative National Review wrote in 1984.

"We would be living under a very different Constitution if Justice Brennan were not on the Supreme Court," Norman Dorsen, then president of the American Civil Liberties Union, wrote in a 1987 article in the National Law Journal.

When conservatives criticize liberal Supreme Court decisions of the last three decades, they single out Brennan as the archetypal "activist."

That role was not predicted when President Eisenhower appointed Brennan, then a New Jersey Supreme Court justice and politically inactive Democrat, to the court in 1956.

Brennan was born in Newark on April 25, 1906, the second oldest of eight children of Irish immigrant parents. His father, who worked as a coal heaver in a brewery, became a union leader, a local political leader and commissioner of public safety.

Brennan, an honors student at the University of Pennsylvania's Wharton School of Finance, received a scholarship to Harvard Law School, where he graduated in the top 10 percent of his class and was president of the student legal-aid society.

He then joined a Newark law firm, Pitney, Hardin & Skinner, practicing there until he entered the Army in 1942 as a major to serve as manpower trouble-shooter on the staff of the undersecretary of war.

He returned to Newark to specialize in labor law -- on the side of business -- before going on the New Jersey Superior Court in 1949 and the state Supreme Court in 1952, both appointments made by a Republican governor.

Brennan received a recess appointment by Eisenhower on Oct. 16, 1956, to replace Justice Sherman Minton, who resigned. The Senate Judiciary Committee approved him 11 to 0, with the only opposition coming from a group opposed to putting a Catholic on the court and from Sen. Joseph R. McCarthy (R-Wis.), who said he was convinced that Brennan was "hostile" to congressional investigations of communism.

Brennan had given a speech in 1954 in which he said "there are some practices in the contemporary American scene which are reminiscent of Salem witch hunts."

Only a loud "No" from McCarthy could be heard in the chorus of ayes when Brennan's nomination was approved. And sure enough, it was Brennan in 1965 who wrote the court's unanimous ruling striking down as a violation of the Constitution's protection against self-incrimination provisions of the 1950 Subversive Activities Control Act that forced an individual to register as a communist.

Eisenhower was reported shocked to discover he had appointed a liberal to the court. When asked if he had ever made a mistake as president, Eisenhower said, "Yes, two, and they are both sitting on the Supreme Court," referring to Brennan and Chief Justice Earl Warren.

Brennan had studied under Justice Felix Frankfurter when Frankfurter taught at Harvard. Later, when both were on the high court, Frankfurter once remarked: "I taught my students to think for themselves, but sometimes I think that Bill Brennan carries it too far."

Brennan was never considered at the far end of the liberal spectrum during the Warren Court years, but rather was the pragmatic coalition-builder, often in the center of a shifting activist majority with then-Justices Hugo Black and William O. Douglas to his left. Former justices Abe Fortas, Arthur Goldberg and fellow liberal Marshall also were often to Brennan's left.

All but Marshall are now gone. The court has shifted to the right, especially with the departure of Powell, and Marshall and Brennan are often isolated, especially on criminal law decisions. They are the only justices who oppose capital punishment in all circumstances as a violation of the Eighth Amendment's ban on "cruel and unusual punishment."

While Brennan rarely dissented in the 1960s -- only three times during the 1968-69 term, Warren's last -- he does so regularly now. In recent terms, according to the Harvard Law Review, Brennan has voted in dissent more than 50 times a year.

Where he wrote ground-breaking rulings in the Earl Warren Court, his task of late had been more to forge a coalition to limit erosion of those rulings under Warren's replacement, Warren E. Burger, appointed chief justice by President Richard M. Nixon.

Even in that role the ebullient, affable Brennan seemed ready for the challenge, declaring in a 1985 speech that being a dissenter was not so bad after all. Dissents, Brennan said, can serve as "damage control," limiting the sweep of majority opinions and giving "practical guidance" to those wishing to circumvent those rulings.

Looking back on the Burger Court, Brennan said in 1986 that "the only one {amendment} that {the Burger court} has gone dramatically far" in limiting is the Fourth Amendment, which bans "unreasonable searches."

Fourth Amendment protections had begun to "unravel," Brennan said. "When I got here it was unraveled and then with {several key rulings} we put it back on its feet and now it's being unraveled again, I'm afraid."

Winning or losing, Brennan seems able to maintain cordial relations with all the justices.

"In 30 years I've sat with 20 justices," Brennan recalled in 1986. (Two more, Justices Kennedy and Antonin Scalia have joined since then.) "I have never had a cross word with any . . . not one. My personal relations with everyone have been most cordial and amiable, however different our views."

But Brennan's relations with Burger often were strained. "He and Vera were so very nice when Marjorie {Brennan's first wife} was ill. They would come over and visit," Brennan said. "They were very thoughtful and giving."

Brennan would not say how he assessed Burger, but former clerks close to him said Brennan felt the job was just too big for Burger, that he was not up to it, that he was not a worthy successor to Earl Warren, a former Republican governor of California.

Brennan was elated to learn of Burger's resignation in 1986, even if it meant that Justice William H. Rehnquist, though more conservative, would become chief.

There has been speculation for almost a decade that Brennan might resign from the court. A decade ago he appeared to his friends to be a tired 73-year-old, despondent, frail and talking about retiring. Friends say his worst times came while Marjorie, his wife of more than 50 years, was gravely ill with cancer. Brennan, who was devoted to her, went home every day at 4:30 p.m. to be with her during the lengthy illness.

In addition, Brennan himself underwent treatment in 1978 for a cancerous tumor in his throat and he suffered a mild stroke in 1979. He stopped going out socially for several years before his wife died in 1982.

Brennan the next year married his secretary of more than 20 years, Mary Fowler, who is widely credited as the principal reason for what several had called his "renaissance."

But in the last several years Brennan grew increasingly conscious of his age. This year he was off the bench for several days with a bad case of flu.

He continued to use an exercise bicycle to stay in shape and, alone among his colleagues, continued to personally review all the thousands of petitions that come to the court each term. Other justices have their clerks screen the petitions.

"I always give at least half a day on Saturday" to reviewing petitions, Brennan once said in an interview, and "sometimes a good deal more than that. But it's never been any different for me. When you have been here as long as I have and you've had so many of these damn things to look at, it's not too hard a job."

With the court under a constant barrage by conservative activists in the Reagan administration, Brennan took some grim comfort in being able to hold the line where he could.

The 1985-86 term was one of his greatest triumphs, a term in which he was able to hold the line against the Justice Department's assault on affirmative action programs.

Shortly after Bush's election, Brennan openly wondered about a replacement and told a reporter that he doubted he would stay on the court another four years.

On one occasion a few years ago, Brennan greeted a luncheon visitor with a copy of a legal trade weekly opened to an article listing likely Bush nominees to the high court. He and the visitor went over the list, with Brennan asking about their credentials, wondering whether they would make good justices, thinking about whether they would be acceptable replacements for him.

Staff writer David Hoffman contributed to this report.

Following are some pivotal decisions written by Justice William J. Brennan Jr.:

Metro Broadcasting v. FCC, 1990: Minority preferences for FCC broadcast licenses do not violate the Constitution.

U.S. v. Eichman, 1990: Statute banning flag desecration violates the First Amendment.

Rutan v. Republican Party of Illinois, 1990: First Amendment forbids public employers to discharge or threaten to discharge employees solely for non-support of political party in power.

Honig v. Doe, 1988: School officials may not unilaterally expel disruptive handicapped students.

U.S. v. Paradise, 1987: A one-black-for-one-white promotions quota imposed by a judge does not violate the Constitution.

Johnson v. Transportation Agency of Santa Clara County, 1987: Limited preferential treatment for women and minorities to remedy past discrimination in the workplace does not violate the law or the Constitution.

School Board of Nassau County v. Arline, 1987: The federal law prohibiting discrimination against the handicapped protects persons with contagious diseases from being fired because of their illness.

Edwards v. Aguillard, 1987: A law requiring public schools that teach the theory of evolution also to teach "creation science" violates the Establishment Clause of the First Amendment.

Local 93 v. City of Cleveland, 1986: Race-based job promotions do not violate federal law when part of a consent decree and when they apply for a limited period of time.

Grand Rapids School District v. Ball, 1985: Remedial and enrichment classes provided by a public school system for students at religious schools violates the separation of church and state.

United Steelworkers of America v. Weber, 1979: Title VII of the Civil Rights Act does not prevent employers from adopting voluntary race-conscious affirmative action programs.

Orr v. Orr, 1979: States violate the equal protection clause when they allow women, but not men, to receive alimony in a divorce settlement.

Monell v. Department of Social Services, City of New York, 1978: City officials and municipalities may be sued for damages by individuals for violating their constitutional rights.

Craig v Boren, 1976: Laws classifying individuals by gender are unconstitutional unless substantially related to the achievement of an important governmental objective.

Elrod v. Burns, 1976: The firing of public employees for partisan patronage reasons violates the First Amendment.

Frontiero v. Richardson, 1973: Gender-based classifications, like race distinctions, are inherently suspect under the Constitution.

Bivens v. Six Unknown Agents, 1971: Individuals may sue the U.S. government for damages for violations of constitutional rights.

Goldberg v. Kelly, 1970: Due process requires that welfare recipients receive a hearing before their benefits are cut off.

In re Winship, 1970: Due process requires that juveniles, like adults, be found guilty "beyond a reasonable doubt."

Shapiro v. Thompson, 1969: The right to travel is constitutionally protected.

Albertson v. Subversive Activities Control Board, 1965: Law requiring registration of Communist Party members violates the Fifth Amendment privilege against self-incrimination.

New York Times v. Sullivan, 1964: First Amendment protects the press from libel suits brought by public officials unless there is proof of actual malice.

Sherbert v. Verner, 1963: Only a compelling state interest justifies limitations on religious liberty.

Baker v. Carr, 1962: Constitutional challenges to malapportionment of legislative districts may be heard in the federal courts.