Spanish government plans to sell military equipment to Venezuela have been branded a "monstrous error" by political opponents.
Rajoy said Venezuela's opposition shared his misgivings
The deal involving ships and transport planes worth 1.3bn euros ($1.7bn; £1bn) was denounced by Spain's conservative opposition leader Mariano Rajoy.
Venezuelan foes of President Hugo Chavez had also criticised it, he said.
But politicians of the governing Socialist party hit back, saying the sale would create jobs in Spain.
The row in Spain follows international concern over Venezuelan plans to buy 100,000 AK-47 assault rifles from Russia.
The US state department has accused Venezuela of starting an arms race and has suggested the rifles could end up in the hands of Colombia's left-wing Farc rebels.
But Venezuela and Russia have both dismissed the US objections, saying the deal does not break international law.
Spanish Prime Minister Jose Luis Rodriguez Zapatero is attending a four-nation summit in Venezuela that also brings together Brazil's President Luiz Inacio Lula da Silva and Colombian President Alvaro Uribe.
The arms deal is expected to be signed on Wednesday.
On the eve of the signing, Mr Rajoy, who leads Spain's opposition Popular Party, told local television: "I think that what we are doing today in Venezuela in selling arms to Chavez is a monstrous error that the Spanish government should absolutely not make."
He added: "It's something that has met with blanket criticism across the whole of the Venezuelan opposition... who suffer under the Chavez yoke."
But Socialist Party manager Jose Blanco said the sale would provide employment for Spanish workers - including those at the publicly-owned Navantia shipyards, which he said had been left "technically bankrupt" by the previous Popular Party government.
This is not the first time that Spain's two main parties have been at loggerheads over relations with Venezuela.
In December, Foreign Minister Miguel Angel Moratinos drew fierce protests for suggesting that the Popular Party government of former Prime Minister Jose Maria Aznar had supported a failed coup bid against Mr Chavez in 2002.