WASHINGTON -- When Supreme Court Justice John Paul Stevens announced his retirement Friday, it set up a long-anticipated confirmation battle during the most sensitive of political seasons.

Stevens, who will turn 90 on April 20, said that after 34 years on the high court it was time to step down.

"It would be in the best interests of the court to have my successor appointed and confirmed well in advance of the commencement of the court's next term," Stevens said in a letter to President Barack Obama.

Obama, who spoke with Stevens by phone Friday afternoon, said that he "will move quickly in coming weeks" to nominate a replacement. The president further said he would be looking for a nominee who had "a record of excellence" as well as a "keen understanding" of how the law affected people.

Like Stevens, Obama said, the new nominee will work to ensure that "powerful interests" are held in check when necessary.

"While we cannot replace Justice Stevens' experience or wisdom, I will seek someone in the coming weeks with similar qualities: an independent mind, a record of excellence and integrity, a fierce dedication to the rule of law and a keen understanding of how the law affects the daily lives of the American people," the president said.

Stevens' departure in June will remove from the court its most senior justice as well as the linchpin of what is now the liberal wing. Stevens' retirement also will ensure that the Supreme Court is front and center during the upcoming midterm congressional elections.

For conservatives and liberals alike, the pending court vacancy will become a way to mobilize the troops as well as to wage proxy fights over hot-button issues, including abortion and wartime security.

For Obama, the vacancy provides a challenge and an opportunity.

Republicans are eager to unite around an issue that will engage their conservative base. The president's Democratic Party controls 59 seats in the Senate, one short of the number that is needed to stop a filibuster.

In a break with tradition, some senators have signaled that they wouldn't be reluctant to filibuster a Supreme Court nominee.

Stevens' departure also provides Obama a second chance to shape the court with a relatively young justice who will be interpreting the Constitution for the next several decades. Because of Stevens' relatively left-of-center position, the new justice might not tip the court's overall ideological balance.

"I hope that senators on both sides of the aisle will make this process a thoughtful and civil discourse," said Sen. Patrick Leahy, D-Vt., the chairman of the Senate Judiciary Committee.

"Americans can expect Senate Republicans to make a sustained and vigorous case for judicial restraint and the fundamental importance of an evenhanded reading of the law," cautioned Senate Minority Leader Mitch McConnell, R-Ky.

The experience of the president's first court choice, Justice Sonia Sotomayor, might foreshadow the political conflict to come. Thirty-one Republicans opposed her, including some who traditionally had crossed party lines to approve Democratic choices in the past.

Nine Republicans voted for Sotomayor.

"Given the track record of the Senate Republicans, anybody Obama supports is going to be attacked," said Gary Jacobson, a political scientist at the University of California San Diego. "They're geared up for battle. The question is, can Republicans oppose the nominee without embarrassing themselves too much."

Having named Sotomayor as the first Hispanic justice on the Supreme Court, Obama now could make more history.

The nine-member court has never had more than two women serving at a time. Obama can change that if he reinforces Sotomayor and Justice Ruth Bader Ginsburg, 77, with a female nominee. Several possibilities exist.

A very serious contender is Solicitor General Elena Kagan, the first woman to hold that prestigious post as well as the first female dean of Harvard Law School. An appellate judge who was considered seriously last year, Diane Wood of the Chicago-based 7th U.S. Circuit Court of Appeals, knows Obama from their teaching at the University of Chicago Law School.

The president might name a second Hispanic justice, Judge Kim Wardlaw of the 9th U.S. Circuit Court of Appeals. Michigan Gov. Jennifer Granholm comes from the non-appellate world, which Obama has said he would like to make use of.

Alternatively, the president might try to name the first Asian-American to the court. Although only seven Asian-Americans are serving on the federal bench, the president could search elsewhere; for instance, by tapping his top State Department lawyer, former Yale Law School Dean Harold Koh.

Or perhaps Washington-based appellate Judge Merrick Garland's experience as a federal prosecutor might give him the nod as a comparatively moderate choice.

"They are choosing from a short list of people who are spectacularly qualified, and who share the president's view of the Constitution," Princeton University Provost Christopher Eisgruber said, "but the president is still going to have a fight on his hands."

Currently, only six of Obama's 15 appellate court nominees have been confirmed.

Stevens' retirement announcement wasn't unexpected. He had hired only one law clerk for next year, instead of the customary four. He would have had to serve roughly an additional year to become either the oldest or the longest-serving Supreme Court justice.

The longest-serving justice will remain William O. Douglas, whose seat Stevens took after President Gerald Ford nominated him in 1975.

Stevens then was serving on the 7th U.S. Circuit Court of Appeals. A Northwestern University Law School graduate and Navy veteran of World War II, he was deemed a conventionally moderate Midwestern Republican at the time.

Stevens "has earned the gratitude and admiration of the American people for his nearly 40 years of distinguished service to the judiciary, including more than 34 years on the Supreme Court," Chief Justice John Roberts Jr. said Friday.

"He has enriched the lives of everyone at the court through his intellect, independence and warm grace."