(CNN) A boarding gate mix-up almost landed a North Carolina teenager in Germany this week instead of Sweden.

Fourteen-year-old Anton Berg of Raleigh was traveling Sunday from the North Carolina capital to Newark, New Jersey, and then to Sweden.

United flew the teen, considered an unaccompanied minor by the US airline, to Newark and said an employee took him to gate B65, where he was supposed to get on a Scandinavian Airlines flight.

However, he boarded a flight by Eurowings, a German airline, which had a plane at the gate, United said in a statement.

Eurowings said its flight and the Scandinavian Airlines airliner were at neighboring gates. A third-party company handled the boarding passes and assigned the teen one for the wrong plane, it said.

Read More