Russian President Dimitri Medvedev sharply criticized objections voiced publicly in Spain over Russian oil firm OAO Lukoil Holdings' (LKOH.RS) possible purchase of a stake in Spanish oil firm Repsol SA (REP), talking in an interview published in Spain's El Pais newspaper Sunday.

Some people were reacting to a possible entry of Lukoil into Repsol with a logic resembling fears of "the Russians a coming," and alleging dangers of the independence of the Spanish state, Medvedev said.

"I think that's a harmful and idiotic logic," Medvedev said. "Dividing investors into good ones and bad ones, into correct ones and incorrect ones, means building a new economic Berlin wall," he added.

The Russian president also said that if Ukraine did not to pay for Russian gas deliveries as agreed in a recent deal, Russia may oblige the country to pay in advance for its supplies. Medvedev added that if troubled Ukraine wasn't able to pay, an international consortium should step in to help Ukraine financially.

-By Madrid bureau, djmadrid@dowjones.com, +34-618-526-915