WASHINGTON — The Supreme Court ended its annual term last week just where it began: evenly divided between a conservative and liberal bloc of four justices, with the deciding votes cast by Justice Anthony M. Kennedy.

And this year, unlike last, the outcomes of cases seemed evenly split as well. Both liberal and conservative sides won major victories countered by stinging defeats.

The nearly even split also carries an election-year message for voters about the power of the presidency to set the future direction of the high court.

Republican John McCain has pledged to choose new justices who are like President Bush's two appointees: Chief Justice John G. Roberts Jr. and Justice Samuel A. Alito Jr.

By contrast, Democrat Barack Obama has pointed with favor at Justices Stephen G. Breyer, Ruth Bader Ginsburg and David H. Souter. The latter is a Republican and an appointee of the senior President Bush, although he votes regularly with the court's liberal bloc.

This year, as usual, the major rulings came at the term's end, and Kennedy, the 71-year old Reagan appointee, played the deciding role.

He spoke for the liberal bloc in two big cases. One rejected the Bush administration's policy of total military control over detainees held at Guantanamo Bay, Cuba, and said these prisoners have a right to plead for their freedom before a federal judge.

The second limited the death penalty to crimes involving murder. A 5-4 ruling rejected a move in Louisiana and five other states to extend capital punishment to people convicted of raping a child.

But the conservative bloc also prevailed in three important decisions, thanks to Kennedy's vote. For the first time, the court ruled that the Second Amendment protects rights of individual gun owners, not just a state's right to organize a militia. This 5-4 decision probably will be the opening salvo in long legal war between advocates of gun rights and gun control.

The court again showed its skepticism toward laws that limit money in politics. A 5-4 ruling struck down the so-called "millionaires amendment" that allowed the opponents of rich candidates to accept larger donations. The court said this violated the free-speech rights of the millionaires because it penalized them for their lavish spending.

And the court said again it was determined to rein in big jury awards that are intended to punish corporate wrong-doers. The justices canceled most of the punitive damages handed down against Exxon for the 1989 Valdez oil spill. More than 32,000 fishermen were left with about one-tenth of the verdict awarded by a jury more than a decade ago.

Last year, the court was evenly split — with Kennedy in the middle — on the regulation of abortion, the use of race in schools and the government's power to combat global warming.

The ideological divide is so set that the outcomes in most major cases almost can be predicted on the day the court agrees to hear the case.

Last June, over strong objections from Bush's lawyers, the court said it would hear a case filed on behalf the Guantanamo prisoners seeking a right to go before a judge. Two weeks ago, as expected, the prisoners won on a 5-4 vote.

The next shift in the ideological balance depends on the next vacancy. Because of the age of the justices, however, a President Obama would have less chance of transforming the court than a President McCain.

The two oldest members of the court, Justices John Paul Stevens, 88, and Ginsburg, 75, are among its most reliable liberals. If Obama replaced them, the court's balance probably would remain unchanged.

A President McCain, however, could tip the balance to the right if he replaced Stevens or Ginsburg with a true conservative.

The conservatives represent the youngest members of the Supreme Court. Roberts is 53; Alito is 58; and Justice Clarence Thomas turned 60 last week.

At times this year, the court seemed a bit less divided than before. For example, Stevens and Breyer joined a 7-2 majority to reject a liberal challenge to the use of lethal injections to carry out the death penalty. They agreed there was no convincing evidence the condemned inmates would suffer intense pain during an execution.

Stevens also joined with the conservatives to reject the Democrats' challenge to new GOP-sponsored laws that require voters to show an up-to-date state identification card at their polling place. He said the challengers to an Indiana law failed to show this requirement would bar eligible voters from casting a ballot.

Meanwhile, in two cases involving racial bias, Roberts and Alito joined with the liberals. In a 7-2 decision, the court overturned a black man's death sentence in Louisiana because prosecutors had schemed to remove all the blacks from the jury.

And the court revived a racial-bias lawsuit from a black assistant manager of a Cracker Barrel restaurant near Chicago who said he was fired after complaining of the mistreatment of other black employees. The restaurant chain contended his suit should have been dismissed because the old civil-rights law at issue did not cover claims of "retaliation."

In those bias cases, Scalia and Thomas dissented alone.

Surprisingly, employees won all the key job-discrimination cases this year. In a victory for older workers, the court said employers must prove they relied on "reasonable factors other than age" if their lay-offs fall hardest on those over 40.

But business also benefited from a new and emerging trend. The justices have said federal regulatory laws trump, or "pre-empt," state laws.

Two weeks ago, for example, the court struck down a California law that would have barred employers from using state funds to oppose union organizers. The high court said this conflicted with federal labor law.

And in February, the court said the makers of federally approved medical devices cannot be sued by patients who say they were injured by a defective device. Their lawsuits, filed in state court, were said to conflict with the federal law.

States were told they cannot require delivery services, such as UPS or FedEx, to check to make sure they do not deliver products such as cigarettes or alcohol to minors. The justices said these state rules conflicted with federal laws that deregulated the airline and trucking industries.

In this case, and others like it, the justices were unanimous or nearly so in their decisions. But by late June, when the major cases were handed down, the 5-4 divide emerged stronger than ever.