To mark the national holiday, Prime Minister Mariano Rajoy and King Felipe VI attended a traditional military parade in central Madrid.
Armed forces marched along Madrid's Paseo de la Castellana boulevard to commemorate the day that Christopher Columbus first arrived in the Americas in 1492.
But events were overshadowed by the crash of a Eurofighter jet, which went down on its route back to base after taking part in the display, killing its pilot.
Separate pro-unity rallies, including one by members of a far-right movement, were organised in the Catalan capital Barcelona.
Spanish unity rally
In Madrid, cheering crowds lined the streets, waving red and yellow Spanish flags and some crying "Viva España!" as air force jets and helicopters swooped overhead.
Some teenagers climbed trees to get a better look as thousands of troops and vehicles parade through central Madrid.
"I love to see people waving our national flag," said Beatriz Trapero, who was watching with her husband.
"There used to be a certain shyness in showing it but now it seems not so much."
Several rallies were called on Thursday in Barcelona, including one by far-right activists.
Around 150 gathered to march against secession from Barcelona's Plaça d'Espanya, flanked by Catalan police and waving Spanish and far-right nationalist flags.
"There has been a coup d'etat," said a man who gave his name only as Eduardo.
"The Spanish have to react to defend the nation," he told AFP.
Marchers chanted: "Puigdemont, go to jail".
Protesters hold flares during a far-right anti-separatist demonstration in Barcelona. Photo: Pau Barrena/AFP
Pro-unity demonstrators held other rallies in Barcelona, following a mass demonstration against Catalan independence at the weekend.
"Today is a special day, we have to go ahead... we are many more" than the separatists, said retired Barcelona resident Eliseo Valbuena Garcia.