China (search) tried Friday to block a third weekend of anti-Japanese protests, telling its people not to damage relations with Tokyo as activists spread messages on the Internet calling for demonstrations in Beijing, Shanghai and other cities.

"Express your patriotic passion in an orderly manner," the Beijing police department said in a statement posted on the Internet. It warned of possible legal action against protesters.

Chinese leaders appeared to be afraid that demonstrations might spin out of control after they took the rare step of allowing two weekends of protests over Japan's wartime past and its bid for a permanent U.N. Security Council seat.

Premier Wen Jiabao (search) said Wednesday that Tokyo isn't ready to join the Security Council permanently, citing the anger of protesters who stoned the Japanese Embassy in Beijing last weekend.

But even as they express sympathy with such sentiments and permit brief protests to appeal to nationalism, communist leaders worry that any public gathering could turn into a protest against corruption or other official abuses.

The United States and Japan warned their nationals as activists called for more protests over Tokyo's Security Council campaign and new Japanese history textbooks that critics say minimize wartime atrocities.

Japanese Foreign Minister Nobutaka Machimura, due to visit Beijing on Sunday, said he hoped the trip would defuse tensions.

"I expect the upcoming meeting will be a step toward creating a better environment," Machimura said in Tokyo.

China has refused Japan's demand for an apology and compensation for damage to the embassy. But it tried to mollify Tokyo, saying Thursday it was trying to "cool down" the Chinese public and appealing to activists to avoid extremism.

Tensions worsened with Japan's announcement Wednesday that it will permit gas-drilling in a contested section of the East China Sea (search).

The Beijing police statement appealed to the public to trust in the ruling Communist Party to act in China's best interests.

"We hope the general public and young students ... will resolutely handle Sino-Japanese relations, will not participate in unapproved demonstrations and activities, and will not engage in activities that negatively impact on social stability," it said.

Police in Shanghai sent a similar message to cell phone users in the city of 15 million. "Express warm patriotic sentiments through proper channels," it said. "Obey the law. Maintain order."

A warning sent out by Japan's Consulate in Shanghai told Japanese to avoid areas where protests might take place. It warns them to be careful about what they say around Chinese employees and others.

The U.S. Embassy warning said its personnel had been ordered to avoid crowds and the areas where demonstrations might occur through this weekend and into early May.

Tensions are fueled by both lingering Chinese anger over World War II and modern anxieties at Tokyo's new military and diplomatic ambitions, as well as competition for energy. The communist Beijing government is eager to preserve important economic relations with Japan while not appearing to its public to be weak on explosive issues of national pride.

Japan has some $280 billion invested in the Chinese mainland. China last year displaced the United States as Japan's biggest trading partner.