Kenya's Supreme Court said on Friday it has upheld a July appeals court ruling in favour of a bitterly-contested finance law which has doubled value-added tax (VAT) on fuel and introduced a new housing levy.

The legislation sparked sometimes violent opposition protests after President William Ruto assented it in late June.

It came into effect on July 28, the day the appeals court lifted a suspension placed on it by a high court on June 30, days after it passed.

An opposition senator had initiated the suspension on the grounds that the parts of the law were unconstitutional. He and three others then challenged the July decision to lift the suspension order on the new law.

"The applicants’ Notice of Motion dated 5th August, 2023 ... is hereby dismissed," the Supreme Court said in its ruling.

Under the new law, VAT on fuel was doubled to 16% and workers face a 1.5% housing levy, matched by employers.

President William Ruto's government has said the higher taxes were necessary to help with growing debt repayments and to fund job-creation initiatives.

In response to the law's signing, the opposition coalition held five protests in July, some of which descended into violent confrontations with police. More than two dozen people were killed and scores injured, human rights groups said.

A separate case challenging the finance law is still in court and its hearing will start next week. (Reporting by Humphrey Malalo; Writing by George Obulutsa; Editing by Hugh Lawson and Philippa Fletcher)