Joining Kennedy in the majority were Chief Justice John Roberts and Justices Antonin Scalia, Clarence Thomas, and Samuel Alito.
In a dissent, Justice Ruth Bader Ginsburg blasted the majority for using "flimsy and transparent justifications" to uphold the ban.
"Today's decision is alarming," she writes. "It tolerates, indeed applauds, federal intervention to ban nationwide a procedure found necessary and proper in certain cases by the American College of Obstetricians and Gynecologists."
She adds, "For the first time since Roe, the court blesses a prohibition with no exception safeguarding a woman's health."
Joining Justice Ginsburg's dissent were Justices John Paul Stevens, David Souter, and Stephen Breyer.
Some legal analysts cautioned about reading too much into the decision. "What's important here is not what the court has done. What's important is how doctors react to it," says legal historian David Garrow.
"If doctors take Justice Kennedy at his word, this will not impinge significantly on a single woman's abortion," he says.
Mr. Garrow adds, "This is not 'the sky is falling.' Hopefully professional doctors will respond to this by reaffirming their commitment to women's reproductive health, rather than running."
The federal Partial-Birth Abortion Ban Act had been struck down as unconstitutional by three federal judges and three federal appeals courts. Those decisions in New York, Nebraska, and California were based in part on what had been viewed as a constitutional requirement that abortion regulations must include an exception to protect a woman's health.
The judges also ruled that the ban created an undue burden on a woman's right to terminate her pregnancy.
The high court took up the Nebraska and California cases last fall. In reversing both decisions, the majority justices said that those challenging the law had failed to prove that it was unconstitutionally vague and that it imposed an undue burden on a woman's right to abortion.