WASHINGTON — The Supreme Court sided today with employees who faced retaliation after complaining about race and age discrimination in rulings that drew support from conservative and liberal justices.

The court, by a 7-2 vote, said a provision of the Civil Rights Act of 1866 covers claims of retaliation that follow complaints about discrimination on the basis of race.

In a 6-3 ruling, the court likewise held that the part of the major anti-age bias law covering federal employees also protects them from retaliation after complaining about discrimination.

Neither provision contains express prohibitions against retaliation.

But Justice Stephen Breyer, writing for the court in a case involving a black Cracker Barrel employee who was fired, said that previous Supreme Court decisions and congressional action make clear that retaliation is covered.

The idea that a provision of the 1866 law, known as section 1981, “encompasses retaliation claims is indeed well embedded in the law,” Breyer said.

Business groups objected that the absence of an explicit prohibition on retaliation was significant and said employees should have to file suit under another law, Title VII of the Civil Rights Act of 1964. That law has a shorter deadline for filing suit and caps the amount of money that a successful plaintiff may recover.

The Bush administration was on the side of the workers.

The case grew out of the firing of a black associate manager at a Cracker Barrel restaurant in Bradley, Ill. Hedrick Humphries claimed he was fired after he complained about race discrimination by other Cracker Barrel supervisors.

Humphries filed a lawsuit claiming both discrimination and retaliation. Both claims were dismissed by a federal judge and only the retaliation claim was appealed.

The Chicago-based 7th U.S. Circuit Court of Appeals said Humphries could pursue his retaliation claim under section 1981. The high court upheld the appeals court ruling.

In the age retaliation case, Justice Samuel Alito’s majority opinion concluded that a U.S. Postal Service employee may pursue her lawsuit under the Age Discrimination in Employment Act.

The law does specifically bar reprisals against private sector employees who complain about discrimination. But it is silent as to federal workers. Alito said the law indeed does apply to both categories of employees.

The case involves Myrna Gomez-Perez, a postal worker in Puerto Rico who alleged she was being discriminated against because of her age. Gomez-Perez, who was then 45, said that after she filed a complaint with the Equal Opportunity Employment Commission, she suffered a “series of reprisals” from her supervisors.

Gomez-Perez sued under the employment act, claiming retaliation in violation of the law.

The 1st U.S. Circuit Court of Appeals in Boston upheld a lower court’s dismissal. The Supreme Court reversed that ruling today.

The administration, which is backing workers in other age bias cases at the high court, said the employment act does not afford federal workers protection from retaliation. It said Congress could have extended protections to federal workers, but didn’t.

Justices Antonin Scalia and Clarence Thomas dissented. Chief Justice John Roberts joined them in the age bias case, but sided with the majority in the Cracker Barrel case.

Both decisions relied, in part, on a 2005 ruling that called retaliation another form of intentional, unlawful discrimination under Title IX, which bars sex discrimination in education. Title IX also doesn’t explicitly talk about reprisals.

Justice Sandra Day O’Connor wrote that 5-4 decision. She has since retired, having been replaced by Alito.