Carlos Vela scored a hat trick to set the MLS single-season goal scoring record as Los Angeles FC eliminated the Colorado Rapids from postseason contention with a 3-1 victory on Sunday.

Vela's three goals gave him 34 for the season, earning the Mexico international the record and snapping a tie with Atlanta United's Josef Martinez, who set the previous mark with 31 last season.

Vela, who recorded his seventh multi-goal game of the season, finished four goals ahead of runner-up Zlatan Ibrahimovic who topped out at 30 goals.

Vela’s only other MLS hat trick came on March 30 at San Jose.

LAFC also set a record for points in a season with a 72, breaking the mark of 71 set by the New York Red Bulls last season. The records didn't stop there as they scored an impressive 85 goals this season.

LAFC already had clinched the Supporter's Shield and a first-round bye in the MLS Cup playoffs.

They open the playoffs on October 23 or 24 against the winner of the first-round matchup between Minnesota United FC and Ibrahimovic's LA Galaxy.

Ibrahimovic didn't give up the scoring race without a fight. He scored his 30th in the ninth minute of a 4-2 loss to the Houston Dynamo on Sunday. The defeat means the Galaxy open the playoffs on the road.

The game marked the final MLS match for Houston player and former US national team member DaMarcus Beasley who left to a standing ovation in the 89th minute. Beasley is retiring after a 20-year career. 

The career of Rapids goalkeeper Tim Howard also came to an end in Sunday's final day of the regular season.

Howard, 40, will head into retirement after 185 MLS games, and 121 with the US national team. He also had stints with Everton and Manchester United of the English Premier League.