WASHINGTON -- U.S. President Joe Biden and Chinese President Xi Jinping have agreed to meet on the sidelines of next month's Asia-Pacific Economic Cooperation summit in San Francisco, according to a U.S. official familiar with the planning.

The two sides worked out an agreement in principle to hold a meeting during the summit as Chinese Foreign Minister Wang Yi met Friday with Secretary of State Antony Blinken and White House national security adviser Jake Sullivan, according to the official, who was not authorized to comment and spoke on the condition of anonymity.

The official added that the two sides have still not worked out details on the exact day of the meeting, venue and other logistics.

The White House said in a statement following Friday's meetings that the two sides were "working toward" a Biden-Xi face-to-face on the sidelines of APEC, a forum of 21 Pacific countries.

Earlier Friday, Biden met with Wang, holding an hourlong talk with the senior Chinese official in the Roosevelt Room at the White House. The meeting, with Blinken and Sullivan present, was the latest in a series of high-level contacts between the two countries as they explore the possibility of stabilizing an increasingly tense relationship at a time of conflict in Ukraine and Israel.

The White House said Biden "emphasized that both the United States and China need to manage competition in the relationship responsibly and maintain open lines of communication," and he "underscored that the United States and China must work together to address global challenges."

White House National Security Council spokesman John Kirby said Biden viewed his meeting with Wang as "a positive development, and a good opportunity to keep the conversation going."

Biden had been widely expected to talk with Wang, a reciprocal action after Xi met with Blinken in June.

Beijing has yet to confirm if Xi will travel to San Francisco for the annual APEC summit, which runs from Nov. 11 to Nov. 17.

Wang is in the midst of a three-day visit to Washington, where he's been meeting with top U.S. officials. He sat down with Blinken on Friday morning for the second time during his trip.

On Thursday, after their initial meeting, the Chinese side said "the two sides had an in-depth exchange of views on China-U.S. relations and issues of common concern in a constructive atmosphere."

In its readout, the U.S. State Department said the two men addressed "areas of difference" and "areas of cooperation," while Blinken "reiterated that the United States will continue to stand up for our interests and values and those of our allies and partners."

Wang said before Thursday's meeting that China's goal was to "push the relationship as soon as possible back to the track of healthy, stable and sustainable development."

U.S. officials had said they would press Wang on the importance of China stepping up its role on the world stage if it wants to be considered a responsible major international player. The U.S. has been disappointed with China over its support for Russia in the war against Ukraine and its relative silence on the war between Israel and Hamas.

"China should use whatever ability it has as an influential power to urge calm" in the Middle East, said State Department spokesman Matthew Miller. "We know China has relationships with a number of countries in the region, and we would urge them to use those relationships, the lines of communication they have, to urge calm and stability."

U.S. officials believe the Chinese have considerable leverage with Iran, which is a major backer of Hamas.

Wang came to Washington at a time when tensions between the two countries remain high, including over U.S. export controls on advanced technology and China's more assertive actions in the East and South China seas.

On Thursday, the U.S. military released a video of a Chinese fighter jet flying within 10 feet (three meters) of an American B-52 bomber over the South China Sea, nearly causing an accident. Earlier this month, the Pentagon released footage of some of the more than 180 intercepts of U.S. warplanes by Chinese aircraft that occurred in the last two years, part of a trend U.S. military officials call concerning.

The U.S. also has renewed a warning that it would defend the Philippines in case of an armed attack under a security pact, after Chinese ships blocked and collided with two Philippine vessels off a contested shoal in the South China Sea.

Beijing has released its own video of close encounters in the region, including what it described as footage of the USS Ralph Johnson making a sharp turn and crossing in front of the bow of a Chinese navy ship. The U.S. destroyer also was captured sailing between two Chinese ships.

Senior Col. Wu Qian, the spokesman of the Chinese defense ministry, said the videos showed that "the U.S. is the real provocateur, risk taker and spoiler."

The Pentagon rejected China's characterization of the USS Ralph Johnson's movements, saying the video includes only "cropped segments of a 90-minute interaction." The ship "complied with international law" and "operated in a lawful, safe and resolute manner," the Pentagon said.

During his visit to Washington, Wang was also expected to discuss Taiwan, a self-governed island that Beijing considers to be part of Chinese territory. Beijing vows to seize it by force if necessary, but Washington, which has a security pact with Taiwan, opposes the use of force.

The Chinese president last came to the U.S. in 2017, when former President Donald Trump hosted him at his Mar-a-Lago resort in Florida. Biden, who took office in 2021, has yet to host Xi on U.S. soil. The two men last met in Bali, Indonesia, in November 2022, on the sidelines of the Group of 20 meeting of leading rich and developing nations.

The U.S.-China relationship began to sour in 2018 when the Trump administration slapped hefty tariffs on $50 billion worth of Chinese goods. It deteriorated further over a range of issues, including rights abuses, the South China Sea, Taiwan, technology and the COVID-19 pandemic.

The Biden-Xi meeting would bring much-needed stability to relations between the two countries, said Yun Sun, director of the China Program at the Washington-based think tank Stimson Center.

"The keyword here is `stabilization' of bilateral ties -- not really improvement, but stabilization," Sun said. "The world needs the U.S. and China to take on a rational path and stabilize their relationship, offering the region and the world more certainty."

------

Associated Press writer Chris Megerian contributed to this report.