MADRID — After listening to 422 witnesses in four months, the Spanish Supreme Court on Wednesday closed the trial of 12 leaders of the Catalan independence movement accused of staging a rebellion during their botched attempt to secede from Spain in 2017.

A verdict in the trial, one of the most important in Spain’s judicial history, is not expected until the fall, by which time Prime Minister Pedro Sánchez is hoping to form a new government, led by his Socialist Party.

On Wednesday, the 12 defendants took center stage, delivering closing statements during which they repeatedly denied charges that they orchestrated violent acts during their unsuccessful secessionist push, which culminated in an unconstitutional referendum followed by a declaration of independence in October 2017. The defendants also argued that the Catalan conflict should be decided by politicians, not Spain’s top judges.

“I sincerely believe that the best for everybody — for Catalonia, Spain, Europe and all — is to return this question to the terrain of politics, which it should never have left,” Oriol Junqueras, one of the defendants, told the court. Mr. Junqueras is the former deputy leader of Catalonia, and still leads the Esquerra Republicana party, which recently became the largest Catalan party within Spain’s Parliament.