The British rider beat multiple Grand Tour winner Alberto Contador to the line in the penultimate stage of the race.
A 10-man escape group attacked early and led by 3:30 with 43km remaining of the 144km test from Al Alam Palace to Housing in Boshar.
But the stage exploded on the first of the three climbs of Boushar Alamrat due to the fierce pace made by Team Sky defending the leader's jersey.
On the penultimate climb, Team Saxo-Tinkoff's Contador suddenly jumped out of the saddle in a vicious move and only Vincenzo Nibali (Astana) was able to respond while Froome kept his cool behind his team-mates.
There was a re-groupement after the descent but Spaniard Contador launched another attack on the final ascent of the 355m climb but Froome and Joaquin Rodriguez (Katusha) bridged the gap to form an elite leading trio 12 kilometres from the finish.
They came under the Flamme Rouge together and 2012 Tour de France runner-up Froome had the burst of speed at the finish to win the stage and move 27 seconds clear of Contador on GC going into Saturday's final stage.
Cadel Evans drops to third overall, 39 seconds behind, after finishing eighth with Rodriguez third on GC at 50 seconds.