The Supreme Court ruled narrowly Monday that workplace discrimination can only be pinned on a supervisor who has the ability to hire and fire, rather than merely direct work assignments.

The 5-4 ruling is a victory for Ball State University in Indiana, which had been sued by an African-American kitchen worker who claimed she was harassed by co-workers. Justice Samuel Alito said his ruling upholds the definition of a supervisor already used in several parts of the country and "will not thwart recovery from workplace harassment."

But it took the justices seven months to reach their conclusion, and only with an angry warning from the court's liberal wing that the decision would do just that. Justice Ruth Bader Ginsburg said the ruling shows a "disregard for the realities of the workplace," and she urged Congress to intervene.