Hello
The decision was reached around 5 am after more than seven hours of meetings.
After most of Spain's World Cup-winning squad were selected for upcoming games earlier on Monday, the players said they would continue their boycott, which came after Rubiales kissed Hermoso on the lips during the trophy presentation ceremony.
The order prevents Rubiales trying to contact Hermoso or coming within 200 metres of her.
Rubiales announced his resignation in a statement in which he said his position had become untenable, with the Spanish Football Federation later confirming he had sent a resignation letter to acting president Pedro Rocha.
Prosecutor Marta Durantez Gil's decision came three days after Hermoso lodged a criminal complaint. It is up to the court to present formal charges.
Spanish football federation president Luis Rubiales' kiss of Jenni Hermoso not only soured the World Cup triumph, but has also triggered a torrent of allegations from other women in sport of predatory behaviour by men.
Rubiales courted controversy after he kissed player Jenni Hermoso on the lips after Spain's victory in the Women's World Cup.
Rubiales said the kiss was consensual and he was the victim of 'social assassination'.
England's second defeat in 39 matches since Sarina Wiegman took over as coach denied them the chance to add a maiden world title to the European Championship crown they won last year.
While disappointed to sign off at the World Cup with another defeat, the Matildas still achieved their best result at the tournament having never previously gone beyond the quarterfinal stage.