MADRID--Spain's third-quarter unemployment rate fell to 21.2%, the lowest level in four years, driven by strong job creation that is likely to boost Prime Minister Mariano Rajoy's chance of re-election in two months' time.

The National Statistics Bureau said Thursday that the number of people without jobs in the eurozone's fourth-largest economy fell by 298,200 in the quarter to 4.85 million, with the economy adding 182,200 jobs. Of those, 152,100 corresponded to the private sector, with the remainder linked to the public sector.

The numbers are in line with government forecasts that the economy will grow over 3% and will add around 600,000 new jobs in 2015, even as Spain narrows its government budget deficit to 4.2% of gross domestic product. It is an unexpectedly swift turnaround for an economy that only emerged in late 2013 from a deep, five-year slump in which it contracted almost 9%.

Mr. Rajoy, who took power in Dec. 2011 and spent much of his first year in office deflecting calls to request a full European Union bailout along the lines of those of Greece, is widely anticipated to run on the economy in the general election due Dec. 20. Mr. Rajoy remains unpopular largely because of widespread corruption in his Popular Party, but opinion polls show Spaniards give the prime minister credit for the economic recovery.

A tumbling unemployment rate is key to Mr. Rajoy's electoral strategy. For much of the early stages of the European economic crisis, Spain had the unwanted distinction of leading the EU unemployment table, only to be surpassed by Greece in mid-2012.

Central bank governor Luis María Linde earlier this week said the rate, which peaked at 26.9% in the first quarter of 2014, may drop below 20% next year if the next government doesn't change the main economic policy thrust.

Spain's economy grew 1% in the second quarter this year compared with the first, and by 3.1% on the year, largely driven by internal demand. INE plans to release preliminary third-quarter GDP data Oct. 30.

Write to David Roman at david.roman@wsj.com