Niemiec was part of an early breakaway group and held on for his first Grand Tour stage victory in a time of 4hr 11min 09sec over the 152.2km ride from Oviedo to Lagos de Covadonga.
Valverde finished second, five seconds ahead of fourth-placed Contador, but cut the two-time Vuelta winner’s lead by 11 seconds thanks to the bonuses on offer for the top three in every stage to move within 31 seconds of the lead.
Britain’s Chris Froome lost seven seconds on Contador and is now tied with Joaquim Rodriguez in third, 1min 20sec back.
“It is an incredibly happy day for me,” said Lampre Merida rider Niemiec.
“In the morning meeting we had thought about resting for tomorrow’s stage, but once I was in the breakaway I saw we had quite an advantage and everyone was working together to get to the end.”
Indeed, the five-strong breakaway group had taken advantage of the relatively flat first 100km to open up an advantage of over 10 minutes at one stage.
However, after a category two climb up the Puerto del Torno they began to split on the gruelling 12.2km hors category climb towards the finish.
Niemiec was accompanied by Australian Cameron Meyer for much of the climb before breaking clear and had just enough to finish five seconds ahead of Valverde and third-placed Rodriguez.
The Spanish trio of Contador, Valverde and Rodriguez repeatedly attacked to try to distance Froome on the final climb, but Contador lamented not making more of a dent in the Sky man’s bid for a first Vuelta victory.
“It was perhaps a bit of shame to not open up the distance more on Froome because with a rider of that quality you always have to try and have as much of a gap as possible,” he said.
“I think Froome is the strongest rival I have come across in my whole career. Maybe in this tour he is finding it a bit harder, but given the quality he has you always have to have the maximum respect and never count him out.
“At the same time I had to be aware of the attacks from Rodriguez and Valverde and in the end I am happy it is another day down and one less to go.”
Valverde was also pleased to have reclaimed some of the 22 seconds he lost on Saturday’s 14th stage.
“Today I wanted to be a bit more conservative and save something for the last push, which went well.”
With just six stages remaining before the champion is crowned in Santiago de Compostela in a week’s time, one of just three remaining mountain finishes comes in Monday’s 160.5km ride from San Martin del Rey Aurelio to La Farrapona. – Agence France-Presse