World Bulletin / News Desk
Spanish media outlets said Rajoy and his center-right People's Party (PP) could not get the backing of the opposition Socialist Workers' Party (PSOE).
Rajoy could only secure the support of 170 deputies in the 350-seat Parliament, short of the 176 needed to govern.
As Rajoy lost the vote, a second vote will follow on Friday.
No party has held an overall majority in Spain since an inconclusive parliamentary election last December. A repeat election in June failed to break the deadlock, but left the PP the largest party in Parliament.
The PP won the most seats, but fell short of a majority in both elections.