WASHINGTON (AP) — The Supreme Court’s conservative majority on Monday sided with Republican Sen. Ted Cruz of Texas in his challenge to a provision of federal campaign finance law, in a ruling that a dissenting justice said runs the risk of causing “further disrepute” to American politics.

The justices, in a 6-3 decision that divided the court along ideological lines, agreed that the somewhat obscure section of the law violates the Constitution. The decision comes just as campaigning for the 2022 midterm elections is intensifying.

Chief Justice John Roberts wrote for the majority that the provision “burdens core political speech without proper justification.”

The Biden administration had defended the provision as an anti-corruption measure, and in a dissent Justice Elena Kagan wrote that the majority, in striking it down, “greenlights all the sordid bargains Congress thought right to stop.” She said the decision “can only bring this country’s political system into further disrepute.”

The case may be important for some candidates for federal office who want to make large loans to their campaigns. But the administration has also said that the great majority of such loans are for less than $250,000 and therefore the provision Cruz challenged does not apply.

The case involves a section of the 2002 Bipartisan Campaign Reform Act. The provision says that if a candidate lends his or her campaign money before an election, the campaign cannot repay the candidate more than $250,000 using money raised after Election Day. The loans can still be repaid with money raised before the election.

Cruz argued that makes candidates think twice about lending money because it substantially increases the risk that any candidate loan will never be fully repaid. A lower court had agreed the provision was unconstitutional.

Cruz, who has served in the Senate since 2013 and ran unsuccessfully for president in 2016, lent his campaign $260,000 the day before the 2018 general election for the purpose of challenging the law.

The government has said that in the five election cycles before 2020, candidates for Senate made 588 loans to their campaigns, about 80% of them under $250,000. Candidates for the House of Representatives made 3,444 loans, nearly 90 percent under $250,000.

The case is Federal Election Commission v. Ted Cruz for Senate, 21-12.