Sanchez took power just over eight months ago after he ousted his conservative rival in a dramatic parliamentary no-confidence vote
Spain's socialist prime minister on Friday called early elections for April 28, the third in less than four years, after his draft budget was rejected in parliament over the Catalan secession crisis.
"Between two options - not doing anything and continuing without a budget, or giving Spaniards their say - I choose the second," Pedro Sanchez told reporters.
Opinion polls suggest one outcome of the snap election could be a rightwing majority in parliament, including a newly-emerged far-right party.
The campaign will focus on the hot-button issue of the secession crisis in Catalonia, with the right-wing furious at Sanchez's attempts to negotiate with the region's separatist executive, accusing him of yielding to their demands to stay in power.
'Willing to talk'
Sanchez took power just over eight months ago after he ousted his conservative rival in a dramatic parliamentary no-confidence vote, but it has been a turbulent term.
At the head of a fragile minority government, the 46-year-old had to rely on the support of unlikely bedfellows in parliament, including the far-left Podemos party, Basque nationalist lawmakers and - crucially - 17 Catalan separatist MPs.
On Wednesday, Catalan MPs joined right-wing lawmakers in rejecting his budget.
They withdrew their backing in protest at separatist leaders being tried for their role in a 2017 attempt to break Catalonia from Spain, and for not being able to hold a legal independence referendum.
Even before Sanchez's announcement, the socialists had already adopted a campaign-like tone, accusing Catalan separatists and conservatives of blocking a budget that included many social-spending measures after years of austerity.
On Friday, Sanchez blasted the "blocking of a social budget after seven years of social injustice, austerity, and spending cuts."
He highlighted his government's short track record - from a 22% rise in the minimum wage to fighting against energy poverty.
He also insisted that talks were the way forward to try to ease the Catalan crisis.
"We're willing to talk and find a solution within the limits of the constitution and the law," Sanchez said.
At the end of his announcement carried live on television, he smiled and told reporters he hoped to continue seeing them "for a long time."
Opposition leader Pablo Casado, smiling broadly, appeared soon after from the headquarters of his conservative Popular Party in Madrid, in front of a large Spanish flag.
"We've toppled Sanchez's government," he said triumphantly.
The 38-year-old said the election would be about "deciding if Spain continues to be hostage of those parties that want to destroy it or a PP leadership that can broker deals with other political groupings to stop the separatist challenge."
"It's the end of an atypical, turbulent term," said Paloma Roman, politics professor at Madrid's Complutense University.
Sanchez has been savaged by the PP, centre-right Ciudadanos and more recently the small far-right party Vox.
Last Sunday, they staged a big protest in Madrid calling for early elections.
Several opinion polls see Sanchez's Socialist party winning an election but likely unable to form a majority in parliament, even with Podemos.
But surveys also say the PP, Ciudadanos and Vox - which has surged recently thanks to its hard line against Catalan separatism - could be able to form a majority.
That would lead to a coalition government with the PP and Ciudadanos, formed with the support of Vox - which is what happened in the southern region of Andalusia after local polls there in December.
"Tensions between the central government and Catalonia are likely to increase in this scenario," said Steven Trypsteen, ING economist for Spain and Portugal.
The other scenario, he said, could be that the right-wing bloc does not get enough lawmakers to form a majority.
In that case, "political gridlock" would be possible, he said.