The president of the Spanish region of Catalonia has signed a decree calling for a referendum on independence.
Artur Mas wants Catalonia to hold a Scottish-style vote on 9 November, but does not have the backing of the central government in Madrid.
Spain quickly denounced the move, calling the plan unconstitutional.
Catalonia, which includes Barcelona, is one of Spain's richest and most highly industrialised regions, and also one of the most independent-minded.
On 19 September Catalonian lawmakers voted by a margin of 106 to 28 in favour of authorising the referendum, known locally as a "consultation".
Mr Rajoy and the Spanish government believe any vote would be illegal.
Two hours after Mr Mas signed the decree, Spanish Deputy Prime Minister Soraya Saenz made Madrid's position clear: "This referendum will not be held because it is unconstitutional," she said.
The prime minister is expected to take action at a special cabinet meeting early next week, and is likely to take the dispute to the country's Constitutional Court.
However, Mr Mas says he can use local laws to hold the vote.
The decree was signed at a short ceremony and will serve as a message of intent to Spain's central government, says the BBC's Tom Burridge in Madrid.
The question now will be on how far the Spanish government is prepared to go in order to stop a referendum, our correspondent adds.
Mr Mas has previously insisted that the pro-independence movement will prevail, even if it faces stiff opposition.
"Catalonia wants to speak," he said after signing on Saturday. "Wants to be heard. Wants to vote. Now is the right time and we have the right legal framework to do so."
The referendum's two questions
"Do you want Catalonia to be a state?
"If so, do you want Catalonia to be an independent state?"
Source: Catalonia Votes website
Soon after the decree was signed, the Catalan hash tag EstemConvocats9N ("We called it for 9 November") became the highest trending topic on Spanish Twitter.
Until recently, few Catalans had wanted full independence, but Spain's painful economic crisis has seen a surge in support for separation, correspondents say.
There is resentment over the proportion of Catalan taxes used to support poorer regions.
The pro-independence movement in Catalonia believes that the region can go ahead with the independence vote after the decree is signed.
Earlier this month hundreds of thousands of Catalans formed a "V" for "vote" along two of Barcelona's main roads calling for their right to vote.
Juan Arza of the Societat Civil Catalana, a civil society movement which opposes nationalism, told the BBC why he opposed the vote.
"A referendum like this divides the society in two, forces people to choose between two different and two contradictory options, black or white, 'Yes' or 'No'," he said.