Venezuela has expelled the Spanish ambassador to Caracas, Jesús Silva Fernández, accusing him of interfering in its internal affairs.
Spain has rejected the allegations and said it would reciprocate.
The announcement comes after the European Union imposed a travel ban and froze the assets of seven senior Venezuelan officials.
President Nicolás Maduro has accused Spain of pushing for the EU sanctions and plotting to oust him.
The EU has expressed concern over human rights violations during anti-government protests in which more than 120 people were killed last year.
On Tuesday Venezuela’s Constituent Assembly announced that it was calling early presidential elections.
Foreign Minister Jorge Arreaza said the move was in reaction to the EU sanctions.
The vote, which is traditionally held in December, will take place by the end of April.
Mr Maduro, who will stand for another six-year term, said it was time “to put an end to the imperialist threat”.
Venezuela has the world’s highest inflation rate and has for years struggled with the shortage of basic goods, including medicines.
Mr Maduro blames “international economic sabotage” – which he said was led by Spain and the US – for the situation.
Mr Maduro told supporters that the US and Spain were trying to bring down his government
“Donald Trump won’t make decisions in Venezuela, [Spanish Prime Minister] Mariano Rajoy won’t make decisions in Venezuela. The people of Venezuela will,” he told thousands of his supporters at a rally in Caracas on Tuesday.
Last month Venezuela expelled the Brazilian and the Canadian ambassadors to Caracas, also accusing them of interference.
Brazil and Canada retaliated by expelling their respective Venezuelan ambassadors.