A 14-year-old traveling alone from Raleigh, North Carolina, to Stockholm, Sweden, was put on the wrong connecting flight headed to Germany on Sunday, according to his mother. And United Airlines has issued an apology to the family.

His flight leg from Raleigh to Newark, New Jersey, was on United Airlines, with the intention of connecting to Sweden on Scandinavian Airlines (SAS). However, a United Airlines employee brought him to the wrong flight, and he was put on a Eurowings flight to Dusseldorf, Germany instead, his mother said.

A series of a dozen tweets by the teen's mother, Brenda Berg, detailed the incident. The first tweet was directed at United and SAS: "@United @SAS my son is in the wrong plane!!! EWR you put him on a plane to Germany!!!!"

Berg's tweets detailed long wait times on the phone with United Airlines' customer service while trying to resolve the situation. She also sent direct tweets to United and Scandinavian Airlines requesting urgently to help her and with complaints about the unaccompanied minor fees she had paid without getting the service she expected.

“The safety and well-being of all of our customers is our top priority, and we have been in frequent contact with the young man’s family to confirm his safety and to apologize for this issue," Frank Benenati, a spokesman for United Airlines, told USA TODAY in an email Monday.

"Once Eurowings recognized that he had boarded the wrong aircraft in Newark, the plane returned to the gate — before taking off," said Benenati. "Our staff then assisted the young customer to ensure that he boarded the correct rebooked flight later that evening. We have confirmed that this young customer safely reached his destination.”

More:Mom sends son with autism on plane with $10 and a note. Son and seatmate become buddies

So what happened?

"We booked him through SAS to visit his grandparents in Sweden," Berg told USA TODAY in an email. She said the flight was a codeshare with United for the Raleigh-Newark leg — a partnership between airlines to market the same flight and allow for easier connections.

"SAS does not have an unaccompanied minor program for a 14-year-old," Berg added. "We intentionally booked a long layover in a domestic location, so it would be easy."

"The Unaccompanied Minor (UM) attendant was supposed to deliver him to Flight SK904 to Stockholm," Berg told USA TODAY. "According to my son, the UM agent took him from the UM room at Newark to the Eurowings flight to Germany that he boarded. The United agent handed my son’s paperwork to the agent at the gate, who immediately moved him onto the plane, apparently without looking at this UM paperwork."

Berg told USA TODAY that her son realized that the flight was headed to Germany instead of Sweden. "Anton contacted a flight attendant, and the plane was turned around," she said.

Eurowings spokesperson Jannah Baldus told USA TODAY in an email that boarding for the SAS flight to Stockholm and the Eurowings flight to Düsseldorf took place simultaneously at neighboring gates.

"The boarding for both flights was handled by an external service provider who was in charge for both SAS and Eurowings," Baldus said, adding that the teen mistakenly received a boarding pass for the Eurowings Germany flight instead of for his intended flight to Sweden on SAS.

Once he was onboard and the cabin crew was alerted to the error, Baldus said they reacted quickly: "The Eurowings crew reacted immediately and informed the captain, who decided to roll back to the gate."

Berg told USA TODAY that SAS agents immediately rebooked her son after he was released from the Eurowings Germany plane, and he had to wait over five hours for the next flight to Stockholm.

United Airlines' unaccompanied minor policy details that "this service is required for children ages 5-14 who are traveling alone."

For $150 one way, the program includes a wristband for a child to wear and special bag tags so United representatives and flight attendants can clearly identify them as a child traveling on their own.

The policy states: "Unaccompanied minors can only travel on nonstop United or United Express flights and United does not offer unaccompanied minor service connecting to or from other airlines' flights."

“We are not able to comment on individual passengers, or other airlines," SAS spokesperson Freja Annamatz said in an email. "At SAS, security, and taking care of our passengers, is always a first priority.”