Asked in parliament by an opposition lawmaker if he would step down, Rajoy said his "intention" was to "carry out the mandate granted by Spaniards" and serve out his four-year term which ends in 2020.
He recalled that his Popular Party (PP) won "over 50 more seats" in the last general election in June 2016 than the second most voted party, the Socialists, who last week filed a no-confidence motion against Rajoy. The vote on the motion will take place on Friday.
- What next? Scenarios after Rajoy's no-confidence vote
- Spanish parliament to debate Rajoy no-confidence motion this week
- Spain's Socialists file no-confidence motion against Rajoy over graft
- Gürtel: Spain's ruling party sentenced in major corruption trial
All major opposition parties are calling for Rajoy to step down after Spain's National Court last week said it had uncovered a vast system of bribes given to former officials or lawmakers of his Popular Party in exchange for juicy contracts between 1999 and 2005.
The court sentenced 29 people to jail for a total of 351 years for corruption, embezzlement and money laundering in the so-called Gurtel trial.
Rajoy became the first sitting prime minister in Spain to give evidence in a trial when he was called as a witness in the case last year, prompting calls at the time for him to resign.
In its ruling, the court said the credibility of Rajoy's testimony "should be questioned".
Rajoy told parliament on Wednesday that the court ruling "does not convict the Spanish government, the ruling does not convict the PP".
He added that Tomas de Torquemada, an infamous Spanish inquisitor, "was back" and accused the Socialists of "blackmail" and seeking to form a "Frankenstein government" that includes anti-establishment party Podemos and Catalan separatist parties and Basque nationalists.
To succeed, the no-confidence motion will need the support of an absolute majority of 176 lawmakers, a difficult task as the opposition parties are deeply divided.