The scoreboard says it all after Atlanta’s opening goal. (USATODAY Sports)

ATLANTA — Even before the opening kickoff, New York City FC faced an uphill battle.

After allowing an away goal in a 1-0 defeat to Atlanta United last week, City needed to score early and probably often.

It didn’t happen.

Josef Martinez scored on either side of halftime to power Atlanta United to a 3-1 second-leg victory over City in the MLS Eastern Conference semifinals at Mercedes-Benz Stadium.

Atlanta won the aggregate goals series, 4-1, and will face the winner of the Red Bulls-Columbus Crew SC game in the conference final.

NYCFC was eliminated in the semifinals for the third consecutive year.

United struck twice within a 16-minute span in the opening half before City woke up.

First, Martinez converted a penalty kick in the 25th minute before Miguel Almiron doubled it as he converted a free kick that went around a six-man wall into the left corner past goalkeeper Sean Johnson.

NYCFC cut thre lead in half as center back Maxime Chanot scored off a deflected free kick in the 45th minute.

Atlanta, however, got the goal back in the 67th minute as he went 1 v 1 on Johnson for a 3-1 advantage to clinch a semifinal spot.