ATLANTA — Tim Weah threw an inexcusable punch, and the United States took a huge blow to its hopes of advancing at the Copa America.

José Fajardo beat backup goalkeeper Ethan Horvath in the 83rd minute to give Panama a 2-1 victory on Thursday night over the shorthanded Americans, putting the host country in danger of elimination if it doesn’t beat Uruguay in its first-round finale.

The U.S. played most of the game a man down after Weah was sent off in the 18th minute.

“You never mean to get a red card. Under no type of circumstances,” teammate Tyler Adams said. “He apologized to the team.”

Weah issued a public apology on social media.

“I let my team and my country down,” he said. “A moment of frustration let to an irreversible consequence, and for that I am deeply sorry to my teammates, coaches, family and our fans.”

Weah was sent off by Salvadoran referee Iván Barton with a straight red card for punching Roderick Miller in the back of the head.

“A silly, silly decision by Timmy that leaves us shorthanded,” coach Gregg Berhalter said.

Folarin Balogun put the U.S. ahead in the 22nd minute but César Blackman tied the score in the 26th.

Horvath, who replaced injured Matt Turner at halftime, couldn’t prevent Fajardo’s close-range shot from going through his arms, and Panama beat the U.S. for just the third time in 27 meetings.

“A win tonight would have put us in a great position, and unfortunately the opposite happened,” American captain Christian Pulisic said. “I’m proud of the effort that we responded with after obviously what happened (with Weah), but just really disappointed that’s the way we did it.”

The U.S., which opened with a 2-0 win against Bolivia, plays 15-time Copa champion Uruguay on Monday at Kansas City, Missouri.

For U.S. to advance, it must either beat Uruguay and have a greater goal difference than Panama if Panama beats Bolivia; tie Uruguay while Panama and Bolivia also draw; or lose to Uruguay while finishing with a better goal difference than Panama and Bolivia. The U.S. is plus-one, Panama minus-one and Bolivia minus-seven.

“We believe in this group,” Berhalter said. “It’s a strong team. I think if we stay focused and stick to and execute a game plan, we’ll be OK.”

But failing to advance in the biggest test for the Americans ahead of the 2026 World Cup certainly would raise questions about whether Berhalter should remain in charge.

He got that very query not long after the final whistle.

“If we don’t qualify for the next round, should my job be in the line?” Berhalter said, cutting right to the point. “That’s not for me to determine.”

Berhalter made three substitutions to start the second half.

Turner left with a bruised left leg and Horvath entered in his first game for club or country since May 4.

Turner’s status for the next match is not known. Weah won’t dress because of the red card.