Chris Wondolowski scored in the 62nd minute to give San Jose the lead for good, and the last-place Earthquakes went on to post an improbable 4-3 victory over Western Conference leaders FC Dallas on Wednesday night at Avaya Stadium in San Jose, Calif.
Wondolowski registered the 142nd goal of his MLS career, bringing him within three of the all-time record held by Landon Donovan. He also had an assist.
Valeri Qazaishvili scored twice before halftime and later assisted on Wondolowski's goal as San Jose completed a surprising season sweep over a Dallas squad that has lost three of its past five.
Magnus Eriksson added a goal early for the Earthquakes, who have not beaten a team other than FCD since a win at Minnesota United on May 12. San Jose scored four goals or more for the first time since a 5-0 victory at Sporting Kansas City on Aug. 19, 2015.
Both Wondolowski and Qazaishvili have eight goals this season for the Quakes, who won at home for the first time since their season opener in March.
Maximiliano Urruti scored and had two assists, and Santiago Mosquera and Dominique Badji also scored for Dallas, which conceded four goals for the first time this season.
FC Dallas are trying to avoid a repeat of last season, when they went 2-7-6 down the stretch to fall from atop the Western Conference standings to out of the playoff picture entirely.
After Qazaishvili's two goals gave San Jose a 2-1 halftime lead, Dallas twice tied the game early in the second half. However, only four minutes after Badji made it 3-3 with his second goal for his new club, Wondolowski struck the net for the final goal of the evening.
After taking a pass above the penalty arc, Wondolowski played a slick, two-touch give-and-go with Qazaishvili to create space inside the area. Then he guided a curling right-footed finish beyond goalkeeper Jimmy Maurer and into the top right corner.
Urruti opened the scoring in the eighth minute before Qazaishvili found the net in 15th and 42nd minutes for his seventh and eighth goals of the season.
Mosquera tied it at 2-all six minutes after halftime before Wondolowski set up Eriksson's strike from distance in the 54th.