The skirl of their pipes had barely receded before two New Hampshire teenagers learned a hard lesson in cross-border musical diplomacy: if your bagpipes have ivory in them, leave them at home before traveling to Canada or risk having them seized at the border.

Campbell Webster, of Concord, and his friend Eryk Bean, of Londonderry, were returning from Canada on Sunday after a bagpipe competition that served as a tuneup for the world championships in Glasgow, Scotland. The 17-year-olds, fresh off winning several top prizes in Canada, got to a small border crossing in Vermont when they were told they’d have to relinquish their pipes because they contain ivory.

The US prohibits importing ivory taken after 1976. Even though the boys had certificates showing their ivory is older – Campbell’s pipes date to 1936 – US Customs and Border Protection seized the pipes in Highgate Springs, Vermont. Well, not all of them: the boys took every other part possibly and left the ivory with the Border Patrol so nobody else could make a full set out of the parts.

“This has been an awful headache,” said Lezlie Webster, Campbell’s mother. “At one point at the Canadian border, they said, ‘No way are we going to get our pipes back.’”

After contacting New Hampshire’s congressional delegation and gathering more than 3,000 signatures on an online petition, the boys are getting their pipes back and were set to fly from Boston to Scotland on Tuesday. But the hassle is lingering like a sour note: Lezlie Webster said the boys had to shell out $576 in extra fees because they took the pipes across the border at a “non-designated crossing”.

“It feels really, really silly,” she said.

A spokeswoman for the US Customs and Border Protection said late Tuesday that the agency was only enforcing the international ban against illegal ivory shipments.

“It is ultimately up to US Fish and Wildlife to determine the origins of the seized ivory and authorize any release of these seized items back to their owners upon the completion of their analysis,” spokeswoman Shelbe Benson-Fuller said.

A message left after business hours Tuesday for the Fish and Wildlife Service was not immediately returned.

Campbell has been playing the bagpipes for 13 years and this particular set belonged to his father, Gordon Webster, who was the ninth sovereign piper to Queen of England Elizabeth II.

“I’ve been playing these certain pipes since around October of last year after he stopped,” Campbell said. “His health went downhill. He [gave] me those pipes and I’ve been keeping them going since then. You’re judged on your pipes. And you can’t find bagpipes like these anymore. They don’t make them like this anymore.”

There was a bright side: the change.org petition got hits from all over the world, and bagpipe makers and other musicians offered the boys the use of their instruments at the World Pipe Band Championships on 15-16 August if necessary.

“Right now, I’m just trying to put it all behind me and thinking about how well this whole Scotland trip is going to go now that my friend and I have the pipes that we need,” Campbell said.