Luis Enrique is returning as Spain coach five months after stepping down because of his daughter’s illness.

He is taking over from former assistant Robert Moreno, who coached the team through qualifying for the 2020 European Championship. His last match was on Monday, a 5-0 rout of Romania in Madrid.

Luis Enrique’s 9-year-old daughter, Xana, died of a type of bone cancer less than three months ago.

Spain head coach Robert Moreno sits on the bench during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain head coach Robert Moreno sits on the bench during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Moreno had said a few months ago he would leave the job if Luis Enrique decided to return. He said he “would be delighted to step aside" if the former coach was ready to come back.

Federation president Luis Rubiales said it was always clear that Luis Enrique would return as coach when felt he was ready.

“Luis Enrique was always the leader of this project,” Rubiales said. “Moreno would remain as the national team coach if Luis Enrique didn’t want to return.”

Moreno will no longer work as an assistant coach to Luis Enrique.

Luis Enrique resigned from the national team in June, a few months after Xana was diagnosed. He had tried to remain in charge while staying with his family, making decisions and watching practices while being away.

Spain ended its qualifying campaign as the Group F winner with eight wins and two draws. “La Roja” finished five points in front of second-place Sweden. It will be one of the top seeded teams for next month’s Euro 2020 draw.

Spanish media said Moreno said goodbye to players after the match against Romania at the Wanda Metropolitano Stadium. He did not show up to speak to the media in the post-match news conference.

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports