Mr Aitken got into the stadium days after the security alarm
A bagpipe player sparked a security alert at the Olympics - after Chinese police mistook his musical instrument for "some kind of weapon".
Charity walker Andrew Aitken, from Galashiels, arrived in Beijing on the same day as the opening ceremony.
He decided to warm-up his pipes near the stadium, not realising he was close to a major electricity station.
A police car pulled up and Mr Aitken said it was only thanks to a passing tourist guide that he avoided arrest.
The Borders piper was in China to carry out a sponsored walk along the Great Wall to raise funds for the National Deaf Children's Society.
He was about two miles from the stadium on the opening day of the Olympics when he decided to entertain locals with some traditional Scottish tunes.
However, the 37-year-old human resources manager did not realise he was standing in a sensitive location - right next to the electricity station which was providing the power for the opening ceremony.
Mr Aitken said: "I'm not all that good on the pipes so I thought I'd go off on my own and have a practice before I had to play in front of the people I was doing the walk with.
"I had a silly soldier's hat on and my kilt and a few locals gathered round and seemed to be enjoying me playing, but just as I finished a police car pulled up with four officers.
"They weren't happy and it emerged that it was heightened security all over China because of the opening ceremony."
It took the intervention of a passer-by to explain to police what the bagpipes were.
"It was pure luck that a tourist guide was passing and stopped them from arresting me by explaining what bagpipes were - they thought the pipes were some kind of weapon," said Mr Aitken.
He was eventually allowed to continue his sponsored walk which raised nearly £3,000.
He also managed to get tickets into the Bird's Nest Stadium a few days after his security scare and watch Usain Bolt win the 100m gold medal.