In a move that bucks the reputation it has developed under Chief Justice John Roberts, the United States Supreme Court on Wednesday ruled 6-3 in favor of a working American in her case against a giant corporation.

The majority opinion—authored by Justice Stephen Breyer, who was joined by Justices Roberts, Ruth Ginsburg, Sonia Sotomayor, Elena Kagan, and Samuel Alito—found that Peggy Young, a former UPS truck driver, had the right to sue UPS for pregnancy discrimination after the shipping company refused to give her a less demanding shift when a medical professional ordered her to not lift heavy items while pregnant.

Katherine Kimpel, a lawyer at Sanford Heisler who specializes in gender and race discrimination and who filed an amicus brief in support of Young in the case, said the decision was a “win for working women and working mothers.” The court ruled that it “was not going to insulate corporate interests from accountability,” she said. Sam Bagenstos, the lawyer who argued Young’s case before the Supreme Court, said in a statement that, with Wednesday’s ruling, “the Court recognized that employers can’t put pregnancy in a class by itself.”

UPS said in a statement that it’s confident that lower courts “will find that UPS did not discriminate against Ms. Young under [the Supreme Court’s] newly announced standard.”(The Supreme Court did not rule on the merits of Young’s case; it bumped the case back down to the Fourth Circuit, which will rule on whether or not UPS engaged in discrimination.)

The case stems from a lawsuit filed by Young in October 2008 that accused UPS of violating the Pregnancy Discrimination Act. In 2002, Young took on a part-time role with UPS as a truck driver, picking up air shipments. Four years later, she took a leave of absence to receive in vitro fertilization. When she became pregnant and a midwife instructed her not to lift packages over 20 pounds, Young asked to return to UPS to do either light duty or her regular job as a truck driver, which seldom required her to lift heavy boxes. According to Young’s Supreme Court petition, her manager told her that UPS offered light duty to workers who sustained on-the-job injuries, employees with ailments covered by the Americans With Disabilities Act, and those who had lost Department of Transportation certification because of physical aliments like sleep apnea; not—the manager said—to pregnant workers.

UPS wouldn’t allow Young to return to her former role either since her lifting restriction made her a liability. Young was required to go on extended, unpaid leave, during which she lost her medical coverage. She returned to work as a driver about two months after her baby was born.

Young lost two previous rulings in her case against UPS. A district court decided in February 2011 that UPS’s decision not to accommodate Young was “gender-neutral.” The Fourth Circuit Court of Appeals later affirmed that decision, ruling UPS had established a “pregnancy-blind policy.”

In October, UPS changed its policy for pregnant workers. This year, it started offering temporary light duty to pregnant workers who need it. Despite the reversal, UPS maintains that its denial of Young’s light duty request was lawful at the time and that its policy change is voluntary and not required by the Pregnancy Discrimination Act. The Chamber of Commerce filed an amicus brief supporting UPS, calling attention to companies that offer pregnant employees “more than what federal law compels them to provide.”

The Supreme Court likely took up Young’s case because it raises the larger question of how to interpret the Pregnancy Discrimination Act of 1978. One portion of the statute has been especially troublesome: a line that says employers must treat pregnant women the same as “other persons not so affected [by pregnancy] but similar in their ability or inability to work.”

Young’s legal team has argued that the statute means that as long as an employer accommodates a subset of workers with disabilities, pregnant workers who are similarly unable to work must receive the same treatment.

UPS, meanwhile, has gone with the interpretation that so long as a policy is pregnancy-neutral—which often means considering pregnancy the same way they would an off-the-job injury that garners no special treatment—an employer is safe from discrimination claims.

In his opinion, Justice Breyer didn’t agree entirely with either side. “We doubt that Congress intended to grant pregnant workers an unconditional most-favored-nation status.” At the same time, he wrote, “UPS says that the second clause [of the Act] simply defines sex discrimination to include pregnancy discrimination. But that cannot be so.”

The court did not issue a rigid rule that will dictate when an employer must make accommodations for a pregnant worker. Instead, Justice Breyer left a bit of wiggle room. He wrote, in essence, that if an employer is going to not accommodate a pregnant woman while accommodating other employees “similar in their ability or inability to work,” the employer must have a “legitimate, non-discriminatory reason” for doing so.

In their dissent, Justices Antonin Scalia, Anthony Kennedy, and Clarence Thomas said the justices in the majority went beyond the intent of the Pregnancy Discrimination Act and imposed new requirements on employers.

Pregnancy discrimination cases are on the rise. In fiscal year 2013, 5,342 pregnancy discrimination charges were filed with the Equal Employment Opportunity Commissions and state and local Fair Employment Practices agencies, up from 3,900 in 1997.

While Wednesday’s ruling wasn’t as big of a win for employees as it could have been, it did set somewhat more stringent guidelines for how employers must treat pregnant workers. “If employers accommodate other people [with similar physical limitations] and not pregnant employees, there better be a really good explanation for that,” Kimpel says.

Watch more business news from Fortune: