The three-time Vuelta winner of team Trek-Segafredo fired on the final climb of the stage, the Puerto del Garbí, and split the lead group. At one point, after Tejay van Garderen (BMC Racing) crashed, only Froome remained with Contador and Jan Polanc (UAE Team Emirates), who had returned from an early escape.
"It was still over 30 kilometres to the finish, and I don't need to drop other guys right now," Froome explained. "I'm happy with the position that I'm in."
Froome holds the top position with 11 seconds over Esteban Chaves (Orica-Scott) and 13 seconds over Nicolas Roche (BMC Racing).
Contador, 23rd at 3-10 minutes, is fighting back after losing time in the first team time trial and mountain days. On the third stage to Andorra, he said that he felt week and lost 2-33. Froome took over the lead jersey that day.
The Puerto del Garbí climb left 36.4 kilometres to race to the Sagunt finish. The other stars who lost time were able to return to Froome's group before they finished.
"I expected someone was going to go today, it was such a tough climb and it was obvious that someone from GC was going to take up the race," Froome added.
"Contador was going so strongly today and he forced the rest of us to go hard as well."
Chaves and 2010 winner Vincenzo Nibali (Bahrain-Merida), fifth at 36 seconds, appear to be Froome's strongest rivals with two weeks to race.
With the Vuelta a España Contador's last race, the attention is on him. Froome is not ruling him out either. He said, "We are still two weeks from Madrid, so anything can happen."
The worst happened to van Garderen on the stage. The American has been riding strongly with Froome and Chaves since the Spanish Grand Tour began on Saturday, but today, he fell at the top of the final climb. He crashed again in his chase and dropped from second to fourth overall.
"Exactly just what you said," Froome said in response to expect the unexpected in a bike race. "I didn't see it, but I heard it, we just went over the top.
"Even if you are at the front, a crash can happen out of the blue. That's part of racing too, but you just have to hope that that's not in your direction. He is a tough guy and I know he'll bounce back from it."
Thank you for reading 20 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1