“It's unfortunate, regrettable. I don't know if he forgot that dozens of people were killed and hundreds were injured in Slovenia,” government spokeswoman Isabel Celaa told Spanish radio when asked about Catalan leader Quim Torra's comments.
The Catalan government “knows very well that if there is any violation of the law, the Spanish government will act,” she added.
Spanish Foreign Minister Josep Borell also weighed in, telling reporters in Brussels that Torra “appeared to appeal for an insurrection” with his language.
During a speech in Brussels on Saturday, Torra urged Catalans to follow the “Slovenian route” to achieve independence.
“Catalans are not afraid. They do not frighten us. There is no turning back in the path to freedom,” added Torra, who recently visited Slovenia, according to the Catalan government's Twitter account.
“Slovenians decided to go ahead with all the consequences. Let's do like them and be ready for anything to live freely,” he said.
After holding an independence referendum considered illegal by Yugoslavia won by the separatist camp, Slovenian officials tried unsuccessfully to negotiate their independence with Belgrade.
Slovenia's parliament then unilaterally declared independence on June 25, 1991, sparking a 10-day armed conflict with the Yugoslav army which killed 62 people.
Torra's predecessor, Carles Puigdemont, visited Slovenia during the summer of 1991 to observe its independence push.
Catalonia's parliament unilaterally declared independence from Spain in October 2017 to no avail following a banned independence referendum.
Spain's Supreme Court in October ordered 18 former Catalan separatist leaders to stand trial over the independence declaration.
Prosecutors are seeking jail terms of up to 25 years on charges of rebellion or misuse of public funds over the failed secession bid. The sensitive trial is expected to start in early 2019.