Coach Paco Jemez admitted he was unsure whether his future was with Rayo Vallecano prior to signing a new contract.
Rayo Vallecano coach Paco Jemez said he had serious doubts about his tenure in Madrid after extending his deal on Friday.
Jemez put an end to speculation surrounding his future by signing a one-year contract, keeping him at the club until the end of the 2015-16 La Liga season.
The 45-year-old, who took the reins in 2012, said the arduous process made him consider his future at Camp de Futbol de Vallecas.
"It has taken a little longer than we expected, but in the end the interest and understanding allowed us to unlock a difficult situation, very difficult," said via quotes published on Rayo's official website.
"The club has made an effort in many aspects and finally has come to an understanding. When an entity wants to reach an agreement it is reached at the end. The intention was to stay and has always been that.
"I doubted my future because you never know how far you can get with negotiations. True, it was a very close negotiations, but ultimately we have redirected. "
Rayo - 10th in the standings - end the season at home to Real Sociedad on Saturday.