CHESTER, Pa. (AP)Julian Carranza and Daniel Gazdag scored two minutes apart in the second half and the Philadelphia Union advanced to their first MLS Cup final with a 3-1 victory over New York City FC on Sunday night.

The Union will head to Los Angeles and face Supporters Shield winner LAFC in the league title match on Saturday.

LAFC advanced to its first MLS Cup championship game with a 3-0 victory over Austin FC in the Western Conference final earlier Sunday. The last Supporters Shield winner to reach the championship game was Toronto FC in 2017.

Cory Burke also scored for the Union, who were unbeaten in 19 matches at home this season.

It’s the first time since 2003 that the top seeds in each conference advanced to the final, and only the fourth time that two teams will make their first appearance in the championship.

”They’re a strong team, they’ve got great players. But we’ve given them a run for their money in some really, really good games against them, even in their building,” Union captain Alejandro Bedoya said of LAFC. ”So it’s gonna be a tough game I think. Two different styles of play, coming in together to clash.”

Gazdag appeared to score for the Union in the 16th minute, but was offside. It was scoreless at the half before Maxi Moralez’s sublime strike that sailed past goalkeeper Andre Blake to put NYCFC in front 1-0 in the 57th minute.

The Union tied it up in the 65th with Carranza’s first career playoff goal. Moments later, Carranza directed a header to Gazdag, who scored to give Philadelphia the lead. Burke added a goal in the 76th.

”The players deserve all the accolades for how hard they pushed. We went down a goal, a really good transition goal from them, but our guys stuck with it and it’s a special time right now in Philadelphia for a lot of reasons, but these guys showed that they’re right up there with the Phillies, Eagles and all those other teams,” said Union coach Jim Curtin, who earned MLS Coach of the Year honors. ”It’s great to see the sport grow this much in the city. I’m really proud.”

The Union saw the return of Bedoya, who was held out of the team’s conference semifinal victory over FC Cincinnati because of a nagging hip injury. But he was hobbling following the game.

NYCFC was hurt by the absence of defender Maxime Chanot because of a lower body injury. Talles Magno was also ruled out.

”Proud of the guys and how we grinded through the year. It wasn’t easy, we played a lot of games and had a lot of successes,” NYCFC goalkeeper Sean Johnson said. ”But ultimately disappointed to go out on this note.”

It was the second straight year the teams reached the Eastern Conference final. Last season, the Union were without 11 players because of COVID-19 protocols and NYCFC won 2-1.

New York City went on to defeat the Portland Timbers on a penalty shootout after a 1-1 draw for the MLS Cup championship.

The Union swept NYCFC in two meetings this season for the first time, including a 2-0 victory in March for the team’s first win at Yankee stadium. Philadelphia also won 2-1 at home in June.

”I wouldn’t count us out against anybody,” Curtin said. ”We kind of have a way of grinding and wearing down teams. That might not be the most fun to watch. But at the same time, it’s very effective and you can ask the other teams that play against us, it’s really hard to play against.”

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP-Sports