Signaling a potential thaw in their long-frozen relations, China and Japan announced Friday that they had effectively agreed to disagree over the sovereignty of disputed islands in the East China Sea and to gradually resume diplomatic and security discussions. The agreement could clear the way for the leaders of the two Asian powers to hold a breakthrough meeting next week at a regional conference here.

In similarly worded statements released by both sides, the two countries said that “different positions exist” over the islands known in China as the Diaoyu and in Japan as the Senkaku. The statements said that both sides would establish “crisis management mechanisms” and work to keep the situation from escalating.

The agreement is the first public declaration by the two countries that they are seeking better relations and want to end the prolonged standoff, which has damaged their economic ties and at times seemed to bring them close to conflict.

The accord, which had been the subject of negotiations for some time, was completed in Beijing on Thursday in a meeting between Japan’s national security adviser, Shotaro Yachi, and China’s chief diplomat, State Councilor Yang Jiechi, according to a Japanese official who spoke on the condition of anonymity because of the sensitivity of the issue.

The agreement came just days before Prime Minister Shinzo Abe of Japan is to arrive in Beijing for the Asia-Pacific Economic Cooperation summit meeting, which started Wednesday. The forum for world leaders begins Monday. Expectations have been high that President Xi Jinping of China will meet with Mr. Abe during the summit meeting, which will be attended by leaders including President Obama.

In Tokyo, the director of the China division of Japan’s Ministry of Foreign Affairs, Atsushi Ueno, said there had been no decision about a meeting between Mr. Abe and Mr. Xi in Beijing. The Chinese state-run news agency Xinhua said in a commentary, “The Chinese Foreign Ministry has yet to offer a definite answer on whether or not Xi will converse with Abe and, if yes, what kind of talks they will have.”

Japan’s foreign minister, Fumio Kishida, will meet with his Chinese counterpart, Wang Yi, on Saturday, Mr. Kishida told reporters on Friday in Beijing, where he was attending a gathering of foreign ministers.

The tone of the accord showed that China was able to maneuver so that there was no mention of Japan’s claim of sovereignty over the islands, said Zhang Baohui, director of the Center for Asian Pacific Studies at Lingnan University in Hong Kong.

Two weeks ago, he said, the Japanese reported that the behind-the-scenes negotiations would lead to a statement that would recognize Japan’s sovereignty but would also say that Japan was aware of China’s position.

“That the statement doesn’t say Japan has sovereignty is a diplomatic victory for China and allows the Xi-Abe meeting to happen in the next few days,” Mr. Zhang said.

The statements on Friday announcing the agreement said that Tokyo and Beijing would gradually resume security and diplomatic dialogue to build mutual trust.

The statements said the two sides had agreed to overcome political obstacles in the spirit of “facing history squarely and looking forward to the future.” But they made no specific mention of one important issue grounded in the countries’ painful World War II history: Mr. Abe’s past visits to the Yasukuni shrine in Tokyo, which honors Japanese war criminals along with the country’s other wartime dead.

Chinese officials have bluntly called for Mr. Abe, a conservative, to end his visits to the shrine, a pledge that would be extremely unpopular with his core constituency. Mr. Abe has made no such promise, said the Japanese official who spoke on the condition of anonymity.

China and Japan have been in a Cold War-style standoff since 2012, when the Japanese government nationalized the disputed islands in the East China Sea, which Japan controls.

Since then, China has repeatedly dispatched paramilitary ships to the waters near the uninhabited islands, though those patrols have been reduced in the last few months in an apparent attempt to defuse the situation.

China also declared an air defense zone above the islands, setting off an international uproar because it demanded that all aircraft entering the area submit flight plans to China first. The United States, whose most important ally in Asia is Japan, advised its civilian airlines to refrain from doing so.

The Obama administration, concerned about the possibility of an altercation near the islands that could explode into a full-blown conflict, had urged Mr. Abe to try to talk to the Chinese. This year, Mr. Obama said in Tokyo that the United States would stand by its commitment to defend Japan in the event of a conflict.

China has long demanded that Japan formally acknowledge the existence of a dispute over the sovereignty of the islands, and Japan has long refused, worried that doing so would strengthen Beijing’s position. The careful wording of Friday’s statements appeared intended to enable each side to say it had not backed down and to claim a diplomatic victory.

The tensions between China and Japan have had significant economic consequences for both sides, including a drop-off of Japanese investment in China by nearly half in the first six months of this year.

The negotiations that led to the agreement announced on Friday appeared to have started in July with the visit to Beijing of a former Japanese prime minister, Yasuo Fukuda, who met with Mr. Xi.

Thomas Berger, a professor at Boston University and an expert on Japanese politics, said that domestic and international concerns had prompted both countries to agree to disagree and get on with other business.

Mr. Abe needed to signal to his domestic audience that his “peace through strength” policy was working, and China, with its economy slowing, needed better economic relations with Japan, he said.

“The overwhelming majority of Japanese, especially in the pragmatic wing of his government, have little desire for an actual conflict with Beijing,” Professor Berger said. “Instead, what they hope is that through a policy of strength, they can get China to moderate its policies toward Japan.”

Mr. Xi was probably hoping to get credit internationally for moderating his position, while not making substantive concessions to Japan over the islands or other issues, Professor Berger said.

By JANE PERLEZ November 7, 2014 in The New York Times