Retired Supreme Court Justice Lewis F. Powell, who for 15 years played a pivotal role in shaping American law as the high court's ideological center, died early Tuesday at age 90.

Powell's votes tipped the balance when the court first upheld the concept of affirmative action and ruled that consenting adults have no constitutional right to engage in homosexual conduct.Powell died of pneumonia in his sleep at his home in Richmond, Va., according to a statement released by the court.

His health had waned in recent months. In January 1997, he closed the office he had kept at the Supreme Court building since his 1987 retirement. Poor health prevented his traveling to the nation's capital.

"I think he will be remembered as the epitome of what everyone believes a Supreme Court justice should be like," said retired U.S. District Judge Robert R. Merhige Jr. of Richmond, his friend of more than 50 years. "He had an incredibly fair, gentle temperament, yet he was strong."

Powell's last hospitalization for any significant duration had been in 1991, after he suffered a fainting spell and irregular heartbeat while attending a meeting in Baltimore. He also had hip-replacement surgery in 1991.

Although he most often described himself as a conservative, Powell throughout his tenure avoided the rigid ideology that at times isolated the court's liberal and conservative wings.

"I try very hard to reconcile views I may have to help put a court (majority) together," he once explained.

A wealthy Virginian who reluctantly accepted his appointment to the Supreme Court, Powell cast votes that often controlled the outcome in some of the court's most closely contested and controversial cases.

He considered his controlling opinion in the landmark 1978 Bakke case, in which the court for the first time upheld the concept of affirmative action, a highlight of his judicial career.

The court in that case voted 5-4 in ruling that would-be medical student Allan Bakke unlawfully was discriminated against because he was white. But the decision also upheld the use of some race-conscious criteria in medical school admissions policies.

Before joining the high court, Powell practiced law in Richmond, where he had grown up. He served as president of the city's school board and as a member of the Virginia Board of Education. In those positions, he helped smooth the way for the racial desegregation of public schools in compliance with federal court rulings.

His wife died in 1996. The couple had three daughters and a son. Funeral arrangements were pending.