FOXBORO >> Nashville SC claimed a 3-2 victory over the New England Revolution at a hot and humid Gillette Stadium on Wednesday night in a back-and-forth contest that featured three lead changes, four set piece goals, a hat trick, and flaring tempers.

The Revolution (6-6-5, 23 points) opened the scoring in the 15th minute through Tomas Chancalay’s second goal of the season. After drawing a foul from Daniel Lovitz near midfield, Carles Gil played a quick free kick to Chancalay, who split two defenders, took one touch, and fired past Nashville goalkeeper Joe Willis.

But the visitors’ offensive firepower eventually came to life as Nashville extended its unbeaten run to 10 league games. Nashville (10-4-5, 35 points) hit the post twice in the first half and forced two sprawling saves from New England goalkeeper Aljaž Ivacic before equalizing in the second minute of first half stoppage time via a Sam Surridge header that kissed off the near post following a cross from the right flank.

Brayan Ceballos helped the Revolution regain the lead in the 49th minute by heading in his first career MLS goal off Gil’s free kick, but the hosts’ advantage lasted seconds. Surridge scored again in the 51st minute, this time slipping in at the back post to ensure Daniel Lovitz’s header off a Hany Mukhtar corner kick made it into the net. The goal was allowed to stand despite suspicion of Surridge being offside on the initial play and a Video Assisted Review (VAR) check.

In the 54th minute, referee Lorenzo Hernandez awarded Nashville a penalty after New England’s Mamadou Fofana brought down Mukhtar in the box. Four minutes later — following a VAR review and a brief scuffle between players — Surridge completed his hat trick, calmly slotting his spot kick into the left corner as Ivacic dove the other way.

The match was an uncharacteristic scoring display for two clubs that usually put out tepid offensive performances against one another. Going into Wednesday’s match, Nashville and New England averaged .71 goals across 12 prior meetings, and the most common score line between them was 0-0.

The match also marked Revolution head coach Caleb Porter’s 400th professional game on the sidelines. The veteran coach owns a 158-138-104 (.526) record across all competitions, with 128 MLS wins — sixth among active coaches and 12th all-time.

The Revolution, who have now lost two consecutive games after going unbeaten in nine regular season games, host the Colorado Rapids at Gillette Stadium on Saturday night.