Minnesota United transformed itself from porous to playoff bound in a single season by investing in a defense that turned the team into a winner in its third MLS season.

That season ended Sunday at loud, packed Allianz Field with a 2-1 loss to a star-studded L.A. Galaxy team that did what United couldn't do often in this season's last 11 games: Show its talent in the field's final third.

"Disappointed," United coach Adrian Heath said afterward. "I thought we were the better team for large periods of the game."

And yet, his team's season is over abruptly in the MLS' new all-knockout playoff format and the Galaxy will play crosstown rival LAFC Thursday back in Los Angeles.

United controlled the run of play for Sunday's first 71 minutes, then allowed two goals in four minutes and neither of them by Galaxy superstar Zlatan Ibrahimovic.

Instead, midfielder Sebastian Lletget's fortuitous, point-blank rebound goal in the 71st minute and Jonathan dos Santos' strike from distance four minutes later outdid United midfielder Jan Gregus' low, driving shot in the 87th minute that brought his team within a goal.

Lletget's goal came after United missed more than a few prime scoring chances: Defender Michael Boxall had two headers on crossing passes he couldn't convert. Starting striker Angelo Rodriguez missed two more chances on runs toward the goal. Galaxy goalkeeper David Bingham beat United's Ethan Finlay in a race for another ball, and newcomer Robin Lod fired another chance high above the crossbar.

"It wasn't the game we should lose," Gregus said.

A Galaxy team that has invested big in offensive players allowed one more goal than it scored in the regular season. It allowed eight goals in its final two games against Vancouver and Houston — two teams that didn't make the playoffs — and lost home-field advantage in the first round.

Yet the Galaxy still flew home winners of what United goalkeeper Vito Mannone called a "very cagey game."

"Tight, not many chances, but we had the best chances," Mannone said. "Unfortunately, football is a cruel game if you don't make your chances. When you don't score, you get punished at this level. Unfortunately, many games in the season we got away with it because we rolled up our sleeves and always managed to find an equalizer or get a tight win. You saw that a lot [at] Allianz Field. Tonight wasn't the day."

Video (03:18) United coach Adrian Heath, goalkeeper Vito Mannone and midfielder Jan Gregus discuss Sunday's 2-1 first-rough playoff loss to L.A. Galaxy.

Until Sunday, United had lost only one home game, on June 2 to Philadelphia. Until Sunday, they had allowed only 13 goals at Allianz Field all season.

This time, United couldn't score enough to offset the Galaxy's two goals during a nationally broadcast game.

"The better team didn't win. The more efficient team did," ESPN analyst Taylor Twellman said.

Ten other teams scored more than the 52 goals United did during the regular season. It outscored opponents by nine all season, but scored only 10 goals in its final 10 games, and its attacking offensive players didn't score a goal in the final five games.

"That's probably why we're not playing on Thursday," Heath said. "We didn't have enough quality in the final third. We got enough balls in there. We just came up short because we didn't have the final ball nearly all evening."

Heath modified his starting 11 by leaving star Darwin Quintero out of it after Quintero fell ill during the week.

Instead, he designated Quintero a substitute whom he brought off the bench in the 60th minute while Kevin Molino started in his midfield spot and Rodriguez started up top for Mason Toye. Quintero's creativity created Gregus' late goal that wasn't enough.

Heath called himself "really proud of the guys" and still "extremely" disappointed.

"I know people will say it has been a good year and it has," Heath said. "It has been a good year from where we were, but we're better in the attacking half than we were this evening."

He promised changes and additions for next season, just like United brought in nine new contributors, including five starters, this season. The futures of players such as Quintero and Mannone, among others, must be decided.

But Heath wasn't ready to contemplate any specific changes 20 minutes after his season ended.

"We have to bring quality players in and make some big decisions," Heath said. "We have to get better. We have to bring quality in. We did last year and we'll have to do it again and if we do, this group will be a match for anybody."