But a late dig from compatriot Nairo Quintana - responding to an attack from Spain's Alberto Contador (Tinkoff-Saxo) in the final two kilometres - put the Movistar rider into the red jersey after team-mate Alejandro Valverde faltered on the decisive climb of the 185km stage.
The upshot of the thrilling finale on a rain-swept climb is that four riders are now within nine seconds of the race lead going into the first rest day: Contador trails Quintana by three seconds, with Valverde now eight seconds behind and one second ahead of Anacona.
Anacona, 26, soloed to victory after attacking from a 31-man break on the third and final climb of the rolling stage from Carboneras de Guadazon. Britain's Chris Froome (Team Sky) is 28 seconds off the summit and in fifth place on GC after fading on the climb to Aramon Valdelinares.
Victory for Lampre-Merida will be a tonic for the Italian team following the last-minute withdrawal of American veteran Chris Horner, the defending champion, ahead of the race.
Anacona attacked on the Cat.2 Alto de San Rafael with 20km remaining and was soon joined by fellow escapees Javier Moreno (Movistar) and Bob Jungels (Trek Factory Racing). The trio held a lead of 5:15 over the Team Sky-led main pack as they crossed the summit of the penultimate climb in driving rain.
Trailing overnight race leader Valverde by 2:50 going into the stage and with 10 bonus seconds available for the stage winner, Anacona was aware that he had two hands to play - for both the stage and the red jersey.
With Luxembourg's Jungels tiring at the start of the final climb, Anacona went for broke with a stinging attack that saw Spaniard Moreno drop back. It was touch-and-go, with the Colombian still holding a three-minute gap over the main pack heading into the final two kilometres.
But Contador's attack - which provoked a reaction from Joaquim Rodriguez (Katusha) and Quintana, but neither Valverde nor Froome - meant Anacona's advantage came tumbling down.
"I knew I was close to taking the red jersey but the win was my main priority," Anacona said. "I may tire later in the race but I will aim for the top ten from here."
Anacona said he knew it was a gamble to attack so early - but it was one he was prepared to take.
"It was risky to go so far from the finish but I had good legs and my rhythm was good and so I attacked. I've had some great wins in my career but this is extra special. It's the first Grand Tour stage win of my life and the feeling is fantastic - I had tears in my eyes as I crossed the line."
Those tears could well have been mistaken for rain - with the riders forced to endure some heavy showers and distinctively lower temperatures from the opening week of the race.
Contador was the first of the main favourites to cross the line, the Spaniard leading both Rodriguez and Quintana across the line 2:16 down on Anacona in twelfth place.
Valverde led a chasing pack - including the likes of Froome, Italian Fabio Aru (Astana), Colombian Rigoberto Uran (OPQS) and Ireland's Dan Martin (Garmin-Sharp) - over the line for 16th place, 2:39 down. As such, the Spanish veteran would have held on to the red jersey by a single slender seconds on Anacona - were it not for the thrilling late joust between Contador and Quintana.
THIRTY-ONE-MAN GROUP: A hectic start to the stage saw a large group form off the front of the peloton featuring some big name riders in Ryder Hesjedal (Garmin-Sharp), Dario Cataldo (Team Sky), Julian Arredondo (Trek), polka dot jersey Lluis Mas Bonet (Caja Rural), Adam Hansen (Lotto Belisol) and Damiano Cunego, along with his Lampre team-mate Anacona.
The break built up a maximum lead of over eight minutes before Frenchman Jerome Cousin (Europcar) pipped Mas Bonet for maximum points over the top of the first climb of the day, the Cat.3 Puerto de Cabigorda, with around 80km remaining.
The points for second place were enough for Spaniard Mas Bonet to retain his polka dot mountains jersey at the end of the day - with eventual stage winner Anacona moving into second place just two points behind.
Some fierce pace-setting by Froome's Sky squad - most noticeably by Vasil Kiryienka, Christian Knees and Peter Kennaugh - saw the break's lead come down to six minutes ahead of the decisive back-to-back climbs that concluded the stage.
Indeed, Sky looked to be in a formidable position going onto the final climb with Froome ably supported by three team-mates - plus Cataldo, once the Italian was swept up from the break.
Contador, on the other hand, looked isolated and devoid of any Tinkoff-Saxo colleagues. Meanwhile, Rodriguez has both Dani Moreno and the caught escapee Eduard Vorganov, while Movistar had both Valverde and Quintana.
Holding the numerical advantage, it looked like Sky were preparing the way for a Froome attack that never came; instead, Contador - seemingly back to his best after breaking his shin during July's Tour de France - used an attack by Martin with 3km remaining as a springboard to dance clear of the pack.
Neither Valverde nor Froome had the legs to follow as both Quintana and Rodriguez rallied back to Contador's wheel - the Colombian doing enough to ensure Movistar keep the leader's red jersey going into Tuesday's first individual time trial.
Second on the stage was Ukraine's Alexey Lutsenko (Astana) who came home 45 seconds down on Anacona and five seconds ahead of Cunego. Moreno finished fourth and Jungels dropped to ninth.
RIDE OF THE DAY: Anacona came so close to a double whammy but can be more than content with his stage win - although Contador's late surge have the Colombian a run for his money in the entertainment stakes.
DAY TO FORGET: Despite being part of the day's main break, out-of-sorts Julian Arredondo eventually finished the stage fifth-to-last and over 18 minutes down on his compatriot Anacona.
COMING UP: Monday's rest day is followed by a 36.7km ITT on Tuesday. Just 28 seconds down on GC, Chris Froome is a safe bet for the red jersey despite a slight wobble in the stage nine finale. The route has one Cat.3 climb but that won't be enough to stop triple time trial world champion Tony Martin (OPQS) from taking an inevitable win.
- Sports & Recreation
- Alberto Contador
- Chris Froome
- Nairo Quintana
- Joaquim Rodriguez