Antonee Robinson, a 21-year-old defender, takes on Douglas Costa in first half at MetLife Stadium. (Jeff Zelevansky/Getty Images)

EAST RUTHERFORD, N.J. — For the U.S. men’s national soccer team, the long road back to respectability after an inexcusable absence from the World Cup began in earnest Friday with a trial by fire.

Brazil brought a blowtorch.

The young Americans — a group of mostly fresh prospects with no starters older than 25 and little name recognition outside soccer circles — felt the heat at the start of an ambitious set of friendlies. But they weren’t embarrassed either. Facing some of the sport’s biggest names, the United States dropped a 2-0 result to the five-time world champions before an announced 32,489 at MetLife Stadium.

At this early stage of the program’s redevelopment, with the next World Cup four years away, scores don’t matter much. Games like this one — and subsequent tests against Mexico, Colombia, Peru, England and Italy — were arranged for the learning experience, not the victories. In time, the U.S. Soccer Federation hopes, this collection of promising charges will compete with elite teams and earn a ticket to Qatar in 2022.

“We’re earning stripes, man,” captain Wil Trapp said. “This is a game where lessons are learned, and they’re learned harshly because a team like this can punish you. So understanding that we’re only going to get better and we’re only going to improve from playing difficult opponents is a big step for us.”

Dave Sarachan, the interim head coach, passed over most of the usual suspects and turned to players such as Weston McKennie (age 20), Tyler Adams (19), Tim Weah (18), Zack Steffen (23) and Matt Miazga (23). Veterans will remain in the mix, but the future of the U.S. program rests largely with this roster, plus rising star Christian Pulisic, who missed this camp with a leg injury.

The Americans conceded goals by Roberto Firmino and Neymar in the first half, but enjoyed some bright moments — some quality threats, a few near-misses and showed composure in difficult situations.

“I’d rather be playing these games than playing a weak team that maybe you get away with some mistakes,” Sarachan said. “We don’t like to lose, but there are lessons in losing. These aren’t qualifiers; this isn’t part of a tournament. These are games to challenge us and improve us, to learn from.”

Brazil is regrouping as well, not because it didn’t qualify for the World Cup, but because it only made the quarterfinals. Despite the failure, Tite was retained as coach, and for the first get-together since the Russian shortfall, he enlisted a heavyweight squad for a two-game U.S. tour. (On Tuesday, Selecao will play El Salvador at FedEx Field.)

The starting lineup featured three players from Paris Saint-Germain, three from Liverpool and one apiece from Real Madrid, Barcelona, Manchester United, Juventus and Atletico Madrid. The United States has one player employed by those organizations: Weah, from PSG, entered in the second half.

As expected, the Brazilians set the terms and needed just 11 minutes to go ahead. Douglas Costa (Juventus) roared past left back Antonee Robinson (age 21) and crossed to unmarked Firmino (Liverpool) for a side volley from four yards.

Although they were under constant duress, the Americans began to find their way around the 30th minute. They gained comfort on the ball and, with midfielders Adams and McKennie showing poise and skill, they created threats with dangerous crosses into the penalty area. John Brooks, a 6-foot-4 center back, had two opportunities for headers deep in the box.

Brazil regained control before intermission. Fabinho surged into the penalty area. Trapp was called for a foul, although contact was light. Neymar converted the penalty kick with a gentle shot into the right corner in the 44th minute for his 58th goal in 91 international matches.

The second half looked like an inconsequential friendly, with the teams combining for 11 substitutions and the urgency level fading fast. The Americans weren’t out of their element, but they were far from the standard they’ll aim to achieve over the next four years.

“We’re still a young team,” McKennie said. “We’re still getting to know each other. We haven’t played many games together. Every game we’ll take something from it. It’s just more experience for a young team.”

Next on the syllabus: Mexico on Tuesday in Nashville.

U.S. notes: The Oct. 16 friendly against Peru will be played at Rentschler Field in East Hartford, Conn. Baltimore had been the U.S. Soccer Federation’s first choice, but the sides were unable to strike a deal.

The last pending piece to the fall schedule is the site of the Italy friendly Nov. 20; it will be a neutral location in Europe. The other matches are Oct. 11 against Colombia in Tampa and Nov. 15 against England in London. . . .

Former U.S. midfielder Jermaine Jones, who scored at the 2014 World Cup and earned 69 caps, announced his retirement from soccer. It comes a week after U.S. forward Clint Dempsey called it quits. Jones, who will turn 37 in November. played for the Los Angeles Galaxy last season. His last U.S. appearance came in March 2017.