His comments came hours after separatist parties submitted a bill on secession to the regional Catalan parliament.
In a rare televised address to the nation, Rajoy slammed the bill as an "act of provocation" which would "have no effect".
"The state will not hesitate to use all the political and legal means afforded by the law and the constitution to defend Spain's sovereignty," he said.
He was speaking just hours after Catalan separatist parties announced they would adopt a resolution in November on launching a process to create an independent Catalan state.
"The Catalan parliament solemnly declares the start of the process to create an independent Catalan State, in the form of a Republic," read the text which will be put to a vote in the parliament in Barcelona.
Catalan pro-independence parties won a majority of 72 in the 135-seat Catalan parliament in September 27 elections.
While topping the poll they failed to win a majority of all votes cast, handing their adversaries in the central government in Madrid a strong argument to resist the push for independence.
"It is an act of provocation on the part of those who want to bypass the law because they know it is not on their side," Rajoy added.
"As long as I am the head of the government, Spain will remain a nation of free and equal citizens," Rajoy added just two months ahead of a December 20th general election.
Catalans' long-standing demands for greater autonomy have intensified in recent years, in tandem with the country's economic crisis.
A region of 7.5 million people which accounts for a fifth of Spain's economic output, Catalonia has its own language, which was suppressed during the 1939-75 dictatorship of General Francisco Franco.