"We were clear: we will vote against the continuity of the Popular Party at the helm of the government, with Mariano Rajoy as prime minister," Pedro Sanchez told a news conference after holding talks with Rajoy for the first time since Sunday's election.
With the Popular Party winning only 123 seats - far short of the 176 it needs for an absolute majority - it is seeking to form a minority government.
To do so it needs the Socialist PSOE, which came in second with 90 seats, to support it during a vote of confidence in parliament.
Reunión con Pedro Sánchez. Apuesto por el diálogo para formar un Gobierno estable que dé certidumbre a los españoles pic.twitter.com/rcXWcyN2oi— Mariano Rajoy Brey (@marianorajoy) December 23, 2015
If the Popular Party fails to form a government, Sanchez said the Socialists would "explore all options for there to be a government of change".
That outcome would mirror events in neighbouring Portugal where the ruling conservatives won an October election but fell to a Socialist government backed by leftist parties just days later.
Under Spanish law, the new parliament must be called by January 13th, after which lawmakers have two months to elect a government. If they fail, the acting prime minister has to call a new election.
Sanchez said holding fresh elections should be the "last option" to overcome the impasse.
Meanwhile Ciudadanos have called for dialogue with the PP and the Socialists with a view to striking "a pact for Spain".
"We propose a pact for Spain to the Popular Party and the Socialists so that nobody takes advantage of weakness, uncertainty and instability to break up the country," said Albert Rivera at a press conference on Wednesday in a reference to a strong secessionist drive in Catalonia.
He has been invited to meet with Rajoy to the presidential palce in Moncloa on Monday as has Pablo Iglesias, leader of Podemos.