QuickStep Floors were the team to take charge, shutting down late attacks and keeping Trentin well positioned on the run-in to the finish.
Alexey Lutsenko (Astana) attacked but, a mechanical stopped him in his tracks as a sprint finish loomed.
And the Italian finished the job off with a superbly-timed sprint out of Andersen’s wheel, with Moscon’s late charge good enough for second.
There was one negative for QuickStep Floors, however – David de la Cruz dropping to fifth overall, having been one of the riders caught behind the seven-second split.
Froome still leads, meanwhile, and will carry the red jersey into the mountains on Saturday.
Vuelta a Espana 2017: stage 13 – result
1) Matteo Trentin (ITA) – QuickStep Floors – 4.25.13hrs
2) Gianni Moscon (ITA) – Team Sky – ST
3) Soren Kragh Andersen (DEN) – Team Sunweb
4) Michael Schwarzmann (GER) – Bora-hansgrohe
5) Tom van Asbroeck (BEL) – Cannondale-Drapac
6) Vincenzo Nibali (ITA) – Bahrain-Merida
7) Chris Froome (GBR) – Team Sky
8) Wilco Kelderman (NED) – Team Sunweb
9) Alberto Contador (ESP) – Trek-Segafredo
10) Nicolas Roche (IRL) – BMC Racing
General classification
1) Chris Froome (GBR) – Team Sky – 53.48.06hrs
2) Vincenzo Nibali (ITA) – Bahrain-Merida +59”
3) Johan Esteban Chaves (COL) – Orica-Scott +2.13
4) Wilco Kelderman (NED) – Team Sunweb +2.17
5) David de la Cruz (ESP) – QuickStep Floors +2.23
6) Ilnur Zakarin (RUS) – Katusha-Alpecin +2.25
7) Fabio Aru (ITA) – Astana +2.37
8) Michael Woods (CAN) – Cannondale-Drapac +2.41
9) Alberto Contador (ESP) – Trek-Segafredo +3.13
10) Miguel Angel Lopez (COL) – Astana +3.58