The Salvadoran government said late Saturday in a statement that the diplomats, who are loyal to Venezuelan President Nicolas Maduro, had 48 hours to leave the country. It said the decision is in line with comments by President Nayib Bukele "not recognizing Maduro's government as legitimate."
Venezuela responded in kind Sunday, ordering Salvadoran diplomats to leave Caracas within two days.
Bukele "is officially taking up the role of pawn of American foreign policy," the Venezuelan government said.
Bukele, who took office in June, responded in a mocking tweet, noting that those ordered to leave Venezuela were holdovers from the previous government, an ally of Maduro.
"I forgot to mention that our Government had not named a single official to our embassy in Venezuela," he wrote. "So the Maduro regime has just expelled officials 100% named by the Government of (ex-President Salvador) Sánchez Cerén, whom they called their friends."
In its statement, Bukele's office called for free elections in Venezuela as a way out of its long-running political and humanitarian crisis.
Guaidó, who leads Venezuela's opposition-controlled congress, declared himself interim president in January, saying Maduro's re-election last year was fraudulent. Maduro says Guaidó is collaborating with the United States in an attempt to stage a coup.
Ronald Johnson, the U.S. ambassador in El Salvador, welcomed the decision to expel pro-Maduro diplomats.
El Salvador's opposition FMLN party criticized the government's move, accused "foreign interests of being behind it and expressed solidarity with Venezuela and "its legitimate President Nicolás Maduro."
The FMLN, or Farabundo Marti National Liberation Front, was a guerrilla group during El Salvador's civil war before transitioning to a political party in peacetime. The last two Salvadoran presidents before Bukele were from the FMLN: Sánchez Cerén (2014-2019) and Mauricio Funes (2009-2014).