"The Chinese public, as optimistic and positive as they are, are deeply patriotic and nationalistic, especially people who are younger," said James Roy of the research firm China Market Research Group. KFC and Apple "are just very closely associated with the United States, and you are seeing people picking the closest symbol they can think of to demonstrate against."

The protests are a reminder of the political risks for global brands in China, where they regularly become targets of nationalist sentiment, often stirred up by official media.

In 2012, sales of Japanese autos plunged when Tokyo and Beijing were in a dispute over control of uninhabited islands in the East China Sea.

The Chinese leadership has tried to tamp down this week's protests with demands in state media to leave foreign companies and their customers alone.

"This is not the right way to express patriotism," said the government's Xinhua News Agency. The China Daily newspaper called the protests "jingoism that does a disservice to the spirit of devotion to the nation."

Three protesters in the central city of Puyang in Henan province were detained by police on charges they illegally disrupted business at two KFC outlets, according to a news report. The web portal Sina said one was ordered jailed for 15 days and the other two for 13 days.

Some KFC customers have responded by posting photos of themselves online with a bucket of chicken, axes or other weapons and signs reading, "patriotic hooligans, try harassing me and I'll take you out."

A man in the eastern city of Yangzhou, northwest of Shanghai, said he watched a protest Tuesday morning after seeing a note online appealing to people to take part. He said it also told protesters to boycott Japanese and Korean goods.

"A group of more than 20 people including children broke into the restaurant and shouted at customers to leave," the witness, Guo Lu, said by phone from Yangzhou. He said police arrived quickly and pushed the protesters out of the restaurant.

The timing is unusually bad for KFC, which is China's biggest restaurant chain with more than 5,000 outlets but is overhauling its struggling business after a food scandal and marketing missteps.

Yum Brands is preparing to spin off its China unit, which also includes Pizza Hut restaurants, as a separate company in October in hopes of improving its performance.

KFC has long been an all-purpose target for protests about US issues, especially in areas outside big cities with few other foreign symbols. In 1999, after NATO jets bombed the Chinese Embassy in Belgrade, protesters wrecked KFC restaurants.

The company and other foreign chain restaurants in China also face an upheaval as customers migrate to fast-growing local competitors they say offer more nutritious meals.

For its part, Apple has faced a series of legal hurdles this year in China, its second-biggest market.

In April, it suspended its iBooks and iTunes Movies services, reportedly due to an order by Chinese regulators.

The next month, an intellectual property tribunal ordered Apple to stop selling its iPhone 6 and iPhone 6 Plus in Beijing after finding they look too much like a model made by a small Chinese brand. Apple was allowed to continue sales while it appeals.

Also in May, a court ruled a Chinese company is allowed to use the iPhone trademark on bags, wallets and other leather goods.

An Apple spokeswoman responded to a request for comment by pointing to CEO Tim Cook's positive comments in April about the company's future in China. Cook said Apple was "really optimistic" and planned to open five more stores in China during the current quarter for a total of 40.