Rajoy lost a parliamentary confidence vote triggered by a long-running corruption trial involving members of his center-right party.
Separatists declared victory in Thursday's regional election.
Catalonia declared independence on Friday. Minutes later, Spain imposed direct rule.
Spain is already fighting back.
Mariano Rajoy said his government had taken this unprecedented decision to restore the law.
If Spain's prime minister invokes Article 155 of the 1978 constitution, it would not be fully effective until at least early next week.
A peaceful independence referendum turned into scenes of chaos.
All of Spain is baffled by what's going on.
"I was ashamed of what was taking place,” the president said during a press conference with the Spanish prime minister.
Rajoy said he would name a new cabinet on Thursday.
Spanish people are drained. It feels like Spain is the main character in the movie Groundhog Day: Everything starts fresh with each new round of elections.
While we wonder if Rajoy has died (politically), the acting president gives an unexpected turn of the screw. He keeps breathing. The election, the humiliation, can wait. He won't resign from anything. The term stretches on, and there is another round of meetings with the king. With what new offer?