"I'd like to be a candidate again and try and become prime minister again," Rajoy told public radio RNE.
This is the first time Rajoy — the head of the governing Popular Party who has been in power since 2011 — clearly stated he would be running in November's general election.
The party took a beating at a regional vote in southern Andalusia last month securing just 26.7 percent of the vote — down from 40 percent in the previous election in 2012 — with the opposition Socialists winning 35.4 percent.
Rajoy, who was personally involved in the Andalusia campaign, was heavily criticised with some saying he is out of touch with the concerns of ordinary Spaniards.
The vote also saw the left wing anti-austerity Podemos party and the centre-right Ciudadanos party win their first parliamentary seats.
The two newcomers on the Spanish political landscape are expected to pose a challenge to the two traditional parties in November's national vote.
They particularly threaten Rajoy's conservative government which implemented unpopular austerity policies — making spending cuts to the tune of 150 billion euros ($162 billion) between 2012 and 2014.
Spain's economy did grow by 1.4 percent in 2014, the first full year of economic growth since a 2008 property crash which put millions of people out of work and pushed the country to the brink of an international bailout.
Rajoy says that despite the economic recovery, tough decisions made by his government during the crisis came with a political cost.
The crisis pushed voters to "look beyond traditional parties", he said.
But Rajoy warned against betting on parties with unknown ideologies.
"The worst that could happen to us right now in Spain would be to change our economic policy."