Jaroslaw Niezgoda scored a pair of first-half goals and the Portland Timbers clinched a spot in the playoffs with a 5-2 victory over the LA Galaxy on Wednesday night.

It is the fourth straight season that the Timbers (10-5-5) have made the postseason.

Cristian Pavon scored twice for the Galaxy (5-11-3), who have lost eight of their past nine games and are sitting in last place in the Western Conference.

Portland Timbers players celebrate Jaroslaw Niezgoda's goal against the LA Galaxy during the first half of an MLS soccer match Wednesday, Oct. 28, 2020, in Portland, Ore. (Sean MeagherThe Oregonian via AP)

Portland Timbers players celebrate Jaroslaw Niezgoda's goal against the LA Galaxy during the first half of an MLS soccer match Wednesday, Oct. 28, 2020, in Portland, Ore. (Sean MeagherThe Oregonian via AP)

The Timbers were coming off a 1-1 draw with Cascadia Cup rival Seattle last week, conceding a goal in stoppage time for the second straight match.

The Timbers went up early on Niezgoda's header to the far post in the sixth minute. He got his second in the 19th minute, giving him seven goals on the season. Portland captain Diego Valeri added a penalty kick in the 30th minute.

The Galaxy closed the gap to 3-1 with Pavon's first goal less than a minute into the second half.

Portland Timbers' Diego Valeri celebrates his penalty kick for a goal against the LA Galaxy during the first half of an MLS soccer match Wednesday, Oct. 28, 2020, in Portland, Ore. (Sean MeagherThe Oregonian via AP)

Portland Timbers' Diego Valeri celebrates his penalty kick for a goal against the LA Galaxy during the first half of an MLS soccer match Wednesday, Oct. 28, 2020, in Portland, Ore. (Sean MeagherThe Oregonian via AP)

But then Eryk Williamson scored in the 60th minute and Andy Polo's stunning volley in the 74th padded Portland's lead. Yimmi Chara finished with three assists.

Pavon added his second in stoppage time, giving him nine goals this season.

Portland was without top scorer Jeremy Ebobisse for the second consecutive game because of a concussion. Meanwhile, the Galaxy were without forward Javier “Chicarito” Hernandez, who has a hamstring issue and announced on Instagram earlier that he wasn't playing.

Portland Timbers' Yimmi Chara chases down the ball during the first half of the team's MLS soccer match against the LA Galaxy on Wednesday, Oct. 28, 2020, in Portland, Ore. (Sean MeagherThe Oregonian via AP)

Portland Timbers' Yimmi Chara chases down the ball during the first half of the team's MLS soccer match against the LA Galaxy on Wednesday, Oct. 28, 2020, in Portland, Ore. (Sean MeagherThe Oregonian via AP)

The Galaxy were coming off a 2-0 loss at LAFC last weekend. Center back Giancarlo Gonzalez received a red card during the match and wasn't available against Portland.

It was the fourth meeting this season between the teams. The Timbers won the previous one 6-3 at Dignity Health Sports Park for the first victory by a road team in the series since 2017.

The Galaxy haven't won in Portland since 2016.

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports