A 14-year-old boy from Raleigh, North Carolina, flying as an unaccompanied minor endured an all-night ordeal after United Airlines directed him onto a plane heading to the wrong country.

Brenda Berg, the boy’s mother, first tweeted to United just before 5:30 p.m. on Sunday, saying her son was placed on the wrong plane during a transfer at Newark Liberty International Airport.

Berg said her son was flying from Raleigh-Durham International Airport, connecting to Stockholm in Newark. He booked his ticket on SAS, a Scandinavian airline. SAS doesn’t have a direct flight between Raleigh and Stockholm, so it included a so-called code-share flight on United from Raleigh to Newark, where the SAS flight was scheduled to depart.

However, Berg said, her son was put on the wrong plane. It was a flight to Düsseldorf, Germany, operated by the German airline Eurowings, a low-cost subsidiary of Lufthansa. Both Eurowings and SAS operate those flights as codeshares with United.

Berg said the issue began when United forced her to register her son as an unaccompanied minor. He was not allowed to manage his own connection at Newark and was instead brought to a room for unaccompanied minors and led straight to the wrong plane, she said.

She said that when she arrived at the Raleigh-Durham airport to check her son in for his flight, she was told that because he was 14, she had to pay a $150 fee for the unaccompanied-minor service. United’s website says that the service is required for 5 to 14 year olds who are traveling alone and that it provides airline representatives to assist them. However, United’s website also says that underage passengers connecting to or from partner airlines can’t use its unaccompanied-minor service.