BARCELONA—The leaders of Catalonia said voters in the restive Spanish region overwhelmingly backed independence on Sunday in a referendum that was boycotted by opponents and marred by violence, putting Spain on the brink of a political and constitutional crisis.

Catalan leaders said preliminary results showed that 2.02 million votes, or about 90% of the total, were cast in favor of a split with Spain. Those ballots represent about 40% of voters Catalan authorities declared eligible for the referendum, which was outlawed by...