SHANGHAI

AS an American journalist based in China, I knew there was a good chance that at some point I’d be detained for pursuing a story. I just never thought I’d be held hostage by a toy factory.

That’s what happened last Monday, when for nine hours I was held, along with a translator and a photographer, by the suppliers of the popular Thomas & Friends toy rail sets.

“You’ve intruded on our property,” one factory boss shouted at me. “Tell me, what exactly is the purpose of this visit?” When I answered that I had come to meet the maker of a toy that had recently been recalled in the United States because it contained lead paint, he suggested I was really a commercial spy intent on stealing the secrets to the factory’s toy manufacturing process.

“How do I know you’re really from The New York Times?” he said. “Anyone can fake a name card.”

Thus began our interrogation, which was followed by hours of negotiations, the partial closing of the factory complex and the arrival of several police cars, a handful of helmet-wearing security officers and some government officials, all trying to free an American journalist and his colleagues from a toy factory.