The San Jose Earthquakes clinched a place in the Western Conference playoffs with a dramatic 3-2 win over Minnesota United on the final day of the MLS season on Sunday.
The victory marks San Jose's first time reaching the playoffs since 2012, and it was Danny Hoesen who opened the scoring for the home side.
Jerome Thiesson worked an equalizer in the 36th minute but Chris Wondolowskipoked home from close range in the 55th minute.
Francisco Calvo's headed goal in the 81st minute looked to have submarined San Jose's hopes but Marcos Urena struck in stoppage-time to give the home side a memorable victory on the day.
The result eliminated FC Dallas, who thrashed theLA Galaxy 5-1, and Real Salt Lake, who edged Sporting Kansas City 2-1 -- both of which needed San Jose to drop points in order for their last-ditch hopes of the postseason to be alive.
In FCD's game, Roland Lamah scored twice, Mauro Diaz had a goal and two assists.
Lamah tied it at one-all in the 37th minute and made it 3-1 in the 49th. He settled Carlos Gruezo's shot inside the six-yard box and sent an open shot into the back of the net for his first goal. After halftime, Lamah finished Diaz's corner kick with a glancing header.
Diaz's penalty kick goal in the 73rd capped the scoring against backup goalkeeper Brian Rowe.
Los Angeles opened the scoring in the second minute on Michael Ciani's header of Romain Alessandrini's corner kick. Starting goalkeeper Clement Diop was given a straight red card in the 71st for taking down Kellyn Acosta on a breakaway.
In Sandy, Utah, Luis Silva scored in the opening minutes as RSL beat Sporting Kansas City.
Real Salt Lake, which was winless in its first five games of the season and won just two of its first 11, finished one point out of the Western Conference playoffs.
Silva came upon a loose ball near the spot and tapped a slow roller past a charging Andrew Dykstra in the third minute and Brooks Lennon made it 2-0 in the 41st. Silva, near the top of the box, drew three defenders and slipped it to Lennon who, after his first shot was rejected by Dykstra, top-netted the rebound.
Ike Opara put away a low, diving header -- off a free kick from Graham Zusi -- in the 89th minute for Sporting KC.
Kansas City, winless in its last five, will be the No. 5 seed in the Western Conference and play at fourth-seeded Houston in the knockout round.
Meanwhile, Darren Mattocks scored early in the second half to give the Portland Timbers a 2-1 victory over the Vancouver Whitecaps.
Portland won the Western Conference title to earn a bye in the first round of the playoffs. The Timbers also won their second Cascadia Cup since joining MLS. The Cascadia Cup is a trophy created by the fans of Portland, Vancouver, and Seattle awarded to the best team in the Pacific Northwest.
Vancouver opened the scoring in the 29th minute, when Yordy Reyna's free kick from 25-yards out found an unmarked Kendall Waston eight yards from goal to head in his fourth goal of the season.
Portland tied it three minutes later. A corner kick bounced through the box and found Darlington Nagbe at the top of the box. Nagbe's shot was blocked by goalkeeper Stefan Marinovic, but Timbers defender Liam Ridgewell reacted instantly to throw a foot out and stab the ball past Marinovic.
Portland took the lead early in the second half, as some fancy footwork and a clever pass by Sebastian Blanco found Vytautas Andriuskevicius open near the goal line. The Timbers defender dragged a pass back to Mattocks, whose shot ping-ponged off of two Vancouver defenders on its way into the net for his ninth goal.
Vancouver started the game without goals leader Fredy Montero. The forward suffered an injury in training Thursday, and only entered the game in the 56th minute.
Nicolas Lodeiro scored two goals, Will Bruin had his third in the past two games and the Seattle Sounders beat the Colorado Rapids 3-0 to wrap up the No. 2 playoff seed in the Western Conference.
The defending MLS Cup champion Sounders avoided this week's knockout round.
Bruin's ninth-minute goal put Seattle on the board and gave him 11 for the season. Lodeiro sent a penalty kick past goalkeeper Tim Howard in the 64th minute, then scored again in the third minute of stoppage time. He finished the year with seven goals.
Both teams finished with 10 men, each losing a player to a straight red card after video reviews by referee Christopher Penso.
Romell Quioto and Mauro Manotas scored in the second half to help the Houston Dynamo beat the Chicago Fire 3-0.
Houston, which is unbeaten in six matches, will host Sporting Kansas City in the single-game knockout round. Chicago also secured a home game in the opening round and will face the New York Red Bulls.
Leonardo opened the scoring in the second minute with a header of Adolfo Machado's long throw in.
On a counter-attack in the 68th minute, Quioto dribbled from near midfield into the 18-yard box and sent a touch-angled shot past goalkeeper Richard Sanchez. Seven minutes later, Manotas redirected Andrew Wenger's cross on a breakaway.
Nemanja Nikolic, in his inaugural season in the MLS, won the Golden Boot award with 24 goals for Chicago, three in front of Portland's Diego Valeri.
Chicago hasn't won in Houston since the 2007 season.
In the East, Atlanta United set a pair of attendance records but failed to secure a first-round bye in the playoffs when Sebastian Giovinco scored on a brilliant free kick in the 84th minute, giving Toronto FC a 2-2 tie and the most points ever in a Major League Soccer season.
Josef Martinez scored his 17th goal in the 74th minute to put expansion United in position to finish second in the Eastern Conference, which would have been good enough to avoid the single-game knockout round.
But Giovinco, with a set piece from just outside the penalty area, curled a shot over the wall that caught the bottom off the crossbar to deflect past leaping goalkeeper Brad Guzan. It was Giovinco's 15th goal of the season.
United broke its own MLS single-game attendance record with a crowd of 71,874 at Mercedes-Benz Stadium, where the retractable roof was open on a warm, cloudy day. Atlanta also set a season record with an average of 48,200 a game, eclipsing the mark of 44,247 set two years ago by Seattle.
The tie gave Supporters' Shield winner Toronto 69 points on the season, beating the previous MLS mark of 68 set by the Los Angeles Galaxy in 1998.
Atlanta will host Columbus in the opening round of the playoffs.
David Villa scored two goals and New York City FC tied the Columbus Crew 2-2 in the first regular-season match at Citi Field to secure the No. 2 seed in the Eastern Conference playoffs.
The new venue was selected for regular-season finale because of a conflict with the New York Yankees playoff run.
Ola Kamara gave the Crew a 1-0 lead in the 11th minute but Villa tied it with a header off a corner kick by Maximiliano Moralez in the 18th and then blasted a right-footer from the top corner of the box that deflected off a diving Zack Steffen and gave NYCFC a 2-1 lead just before halftime.
Josh Williams, who had a brief stint with New York City FC in 2015, headed home a corner kick by Federico Higuain in the 58th minute to cap the scoring. Williams, a defender, has scored all of his three goals this season in the last four games.
Villa finished the regular season with 22 goals -- his second consecutive 20-goal season -- and has 61 goals in three MLS seasons.
New York City earned a bye into the conference semifinals, which begin Oct. 30.
Kelyn Rowe scored in stoppage time to give the New England Revolution a 3-2 victory over the Montreal Impact.
Rowe, a late substitute, put a shot from 30 yards out just under the bar behind goalkeeper Max Crepeau moments after Montreal's Matteo Mancosu tied it with a 90th-minute goal.
Diego Fagundez and Krisztian Nemeth also scored for New England.
Patrice Bernier scored in his final game for Montreal.
Gonzalo Veron and Michael Murillo scored minutes apart and the New York Red Bulls beat rival D.C. United 2-1 for the Atlantic Cup in the final MLS game at RFK Stadium.
United is set to play home games next season at the new Audi Field, located three miles southwest of RFK.
New York, which last won at RFK in 2013, will be the No. 6 seed in the Eastern Conference playoffs and play at third-seeded Chicago in the knockout round.
Veron tapped a slow roller into an open net in the 75th minute to cap the scoring. Vincent Bezecourt back-heeled it to Alex Muyl, who fed a low cross to Veron for the finish -- past a diving Steve Clark -- from the top of the six-yard box.
Paul Arriola ripped a volley, off an arching cross from Luciano Acosta, for his first MLS goal to give United a 1-0 lead just before half-time. Murillo tied it in the 68th, tapping it back-and-forth twice with Muhamed Keita before chipping a volley over Clark into the net. Arriola, a 22-year old, signed with D.C. on Aug. 10.
C.J. Sapong had two goals and set Philadelphia's single-season goals record and Fabrice-Jean Picault and Ilson Pereira also scored twice to help the Union beat Orlando Cityin a season-ending game with no playoff implications.
Ilsinho, racing toward the top of the box, put away a low cross from Alejandro Bedoya in the third minute and then chipped a feed to Picault, who flicked a header high in the net to give Philadelphia a 2-0 lead in the sixth minute.
Sapong tapped a sliding finish into an empty net to break Sebastien Le Toux's club record of 14 goals, set in 2010. A pass from Fabio Alves led Picault, who outraced a defender down the left sideline and then fed Sapong for the easy goal. Picault slotted a left-footer through the legs of goalkeeper Earl Edwards Jr. in the 38th minute to set Philadelphia's record for goals in a half and make it 4-0.
Ilsinho added a goal in the 63rd and, after Dom Dwyer put Orlando City on the board, Sapong's 16th goal of the season capped the scoring in the 74th.
Orlando was without 35-year-old Brazilian soccer star Kaka, who played his final game with the Lions last weekend.
For a look at the MLS Playoff pairings, click here.