Porte hit the finish line on the Alto do Malhão to take a solo win three seconds ahead of last year’s overall winner and current world champion Michal Kwiatkowski (Etixx-QuickStep), with Ion Izagirre (Movistar) six seconds back.
Crucially, Thomas managed to limit his losses against key rival Kwiatkowski, coming in fourth and just nine seconds behind Porte.
Thomas has a comfortable buffer of 27 seconds in the general classification over second-placed Kwiatkowski going into Sunday’s relatively flat final stage, which is predicted to end in a bunch sprint.
Home favourite Tiago Machado (Katusha) lies in third place overall at one minute and 11 seconds. Porte’s stage win moves him up to fourth overall.
With Chris Froome taking the stage win and overall lead in the concurrently running Ruta de Sol in Spain, it sets up the distinct possibility on Sunday of two British Sky riders winning key early-season races.
Volta ao Algarve 2015, stage four: Tavira to Malhão, 216km
1. Richie Porte (Aus) Sky
2. Michal Kwiatkowski (Pol) Etixx-QuickStep at 3 secs
3. Ion Izagirre (Spa) Movistar at 6 secs
4. Geraint Thomas (GBr) Sky at 9 secs
5. Michael Woods (Can) Optum at 13 secs
Overall classification after stage four
1. Geraint Thomas (GBr) Sky
2. Michal Kwiatkowski (Pol) Etixx-QuickStep at 27 secs
3. Tiago Machado (Por) Katusha at 1-11
4. Richie Porte (Aus) Sky at 1-14
5. Luis Leon Sanchez (Spa) Astana at 1-18