Spanish Prime Minister Pedro Sánchez has called an early general election for Nov. 29, bringing the country to the polls roughly eight months ahead of schedule as his Socialist government seeks to capitalize on growing anger over housing costs and public services.

Sánchez announced the election Monday after weeks of protests over Spain's housing crisis and a major legislative setback for his government. The decision could reshape Spain's political landscape and determine whether Sánchez remains in power or gives way to a government led by the conservative Popular Party, potentially with support from the right-wing Vox party.

Housing has become one of the country's most pressing political issues. Demonstrations have taken place in cities across Spain as frustration over high housing costs and evictions has grown, including widespread attention surrounding the eviction of an 87-year-old woman in Madrid last month.

Sánchez's government suffered another setback last week when opposition parties rejected emergency measures intended to address evictions and real estate speculation. The defeat intensified speculation that Sánchez would call an early election and make housing and social policy central issues in the campaign.

In an address to the nation, Sánchez presented the election as a choice between his government's progressive agenda and what he described as a broader European far-right movement. He argued that a larger progressive coalition would allow Spain to address its major economic and social challenges.

Sánchez, 54, has served as prime minister since 2018 and has become one of Europe's longest-serving leaders. His government has maintained a strong focus on migration, social programs and environmental policy, while Sánchez has also emerged as a prominent critic of President Donald Trump and U.S. foreign policy.

The prime minister's government, however, has faced a series of political and legal challenges. Investigations have involved members of his Socialist Party as well as his wife and brother, both of whom deny wrongdoing. His government has also faced criticism over its handling of a major migration crisis involving tens of thousands of migrants crossing into Spain's North African territory of Ceuta.

Sánchez has governed through a minority coalition with the left-wing Sumar party since 2023 and depends on several smaller parties to pass legislation. That arrangement has repeatedly made it difficult for the government to advance its agenda through Parliament.

The election will pit Sánchez against Popular Party leader Alberto Núñez Feijóo, whose party currently holds the largest number of seats in Parliament. Feijóo said Monday that voters would have an opportunity to decide the country's direction and framed the election as a referendum on Sánchez's government.

The Popular Party is expected to focus its campaign heavily on allegations of corruption and the government's handling of the Ceuta migration crisis, while Sánchez's Socialists are seeking to make housing and public services central to the contest.

Political scientist Oriol Bartomeus of the Autonomous University of Barcelona said the timing allows Sánchez to frame the election around housing and traditional left-versus-right divisions that could benefit his party.

The outcome could have broader implications for Spain's political direction. If Sánchez loses his governing position, the Popular Party could seek to form a government with support from Vox, potentially ending one of Europe's most prominent progressive governments.

The formal dissolution of Parliament must still be approved by Sánchez's Cabinet before the Nov. 29 election can proceed.