Marcelino returns to Racing Santander
Racing, who were taken over last month by Indian investor Ahsan Ali Syed, terminated Portugal's contract on Monday and Marcelino has agreed a deal until the end of next season, a club spokesman said.
The Cantabria-based side are 16th in the standings, one point above the relegation places, and have drawn both their games since Ali Syed became majority shareholder.
The founder and chairman of investment company Western Gulf Advisory, he has said he wants to make the heavily indebted club a recognised name internationally.
Racing's highest finish for more than 60 years came under Marcelino in 2008, when sixth place earned a place in the UEFA Cup, but they are typically involved in the relegation scrap.
Marcelino, 45, last took charge of the club after a successful spell at Recreativo Huelva, leading them to promotion to the top flight and an eighth-place finish in La Liga.