Anger with corruption allowed Sanchez to win Friday's no-confidence motion by 180 votes to 169, with one abstention.
The incoming prime minister has outlined that his priorities will be social issues - such as measures to help young people and the elderly - before calling elections, though he hasn't said when there might be a vote.
Spanish Prime Minister Mariano Rajoy (bottom R) acknowledges applause from Popular Party's members of parliament during a debate on a no-confidence motion at the Lower House of the Spanish Parliament in Madrid on June 01, 2018.
However, the support of nationalist and leftist parties in Friday's vote does not necessarily mean they will back Sanchez' government, which could lead to a political stalemate in parliament.
The new PM has promised to call early elections, but has not set a date.
Ciudadanos leader Albert Rivera said the change of government "is not good news for Spain".
Aitor Esteban, a Basque party MP, warned Mr Sanchez: "Your government will be very complicated, weak and hard".
"This is going to be a constant bing, bang, boom".
Topeka Sears closing in September
This news comes after Sears Holdings said on January 4 that it would close 64 Kmart and 39 Sears locations by April of this year . There are also independently owned Sears Hometown stores in East Wareham, Great Barrington and Hadley.
He said Mr Rajoy, 63, had failed to take responsibility for his party's involvement, which came to light last week after one of its former treasurers was given a 33-year jail sentence.
"Today we are signing a new page in the history of democracy in our country".
Despite winning the last two votes, he lacked the absolute majority of his first term.
He put Spain back onto the path of growth after a devastating economic crisis although unemployment remains sky-high, jobs precarious and many complain inequalities have risen.
But his term in office was also marred by a series of corruption scandals involving former PP members.
Lawmakers stood and cheered in parliament as the untested 46-year-old - a pro-European lawmaker who has never been in government - became the country's seventh head of government since its return to democracy in the late 1970s.
In its ruling, the court said the credibility of Rajoy's testimony "should be questioned".
The reputation of Rajoy's Popular Party's was badly damaged by a court verdict last week that identified it as a beneficiary of a large kickbacks-for-contracts scheme.
He also hit back by listing the many graft cases involving the Socialists over the years. "With what moral authority do you speak?" he told Sanchez.
- Assassin's Creed Odyssey Leaked, Takes Place in Ancient Greece
- Controversy Roseanne Barr Forgives Costars Sara Gilbert, Michael Fishman
- Did Trump Fire Comey Over the Russia Inquiry or Not?
- Netanyahu: There is no place for Iran in Syria
- USA set to impose tariffs on steel from Canada, EU, Mexico
- Pompeo confident North Korea summit moving in the right direction
- JR Smith's Blunder in NBA Finals Game 1 Broke Twitter
- USA officials travel to N Korea over preparation of likely summit
- Golden State Warriors beat Cleveland Cavaliers in overtime in game one
- NBA Finals: Warriors vs