WASHINGTON — A Supreme Court ruling will mean that prisoners who win civil rights lawsuits against their jailers will generally be handing over more of their winnings to their lawyers.

Lower courts had been split over how much federal law requires prisoners to pay their lawyers after winning money in those cases. The Supreme Court ruled 5-4 Wednesday that courts must apply the prisoner’s winnings to pay attorney fees but cap the amount at 25 percent of the prisoner’s award. The defendants pay the rest of the lawyer’s fee.

Some lower courts had interpreted the law to mean that a judge could set a lower percentage for the prisoner to pay.

The case the justices decided involved an Illinois prisoner who won a $308,000 judgment after being beaten by corrections officers.