The 164.8km run from Caravaca de la Cruz to Alhama de Murcia ended with a thrilling descent after riders climbed the Collado Bermejo.
Trentin (Quick-Step Floors) sealed his second stage win by beating Rojas in a sprint, despite the Murcia-born rider's desperation to win on home soil.
He completed the stage in a time of three hours, 34 minutes and 56 seconds, his team's fourth stage victory of the Vuelta, ahead of Movistar's Rojas and Jaime Roson Garcia of Caja Rural.
"I really wanted it. I was thinking about this stage for a while because the climb was hard, but it was a steady grind," Trentin said.
"It was something that I can handle pretty well. I knew the downhill was really technical. For me, it was good having Rojas in the front group because he was really, really good going down. I could just follow him."
With the climb up Collado Bermejo on sight, the battle for the breakaway was intense. It took two hours at an average speed of 52.3km/h for a group of 18 riders, led by Trentin, Rojas and Roson to eventually open a gap over a very nervous peloton.
In the final 40km, Trentin, Rojas, Roson and Jacques Janse Van Rensburg (Dimension Data) used the climb to get rid of their breakaway companions and battle it out on the downhill to Alhama de Murcia.
Trentin and Rojas dominated the descent with the Quick-Step Floors rider taking the win.
In the peloton, Vincenzo Nibali (Bahrain-Merida) accelerated in the descent but couldn't drop his rivals. A later move from Nicolas Roche (BMC) saw the Irish man gain 29 seconds on the rest of the GC contenders.
While still third overall, Roche's efforts pulleded him level with Esteban Chaves (Orica-Scott) with both riders now 36 seconds behind Froome (Sky).