BEIJING - Japan and China agreed Tuesday to work toward a trilateral summit with South Korea, a senior diplomat said.

"With regard to the trilateral summit, we will continue coordination" and this was confirmed, Japanese Deputy Foreign Minister Takeo Akiba told reporters after a meeting with Chinese Foreign Minister Wang Yi and other senior officials in Beijing.

Akiba held discussions with Kong Xuanyou, China's assistant foreign minister, for more than three hours, which were in part aimed at creating a favorable environment for Premier Li Keqiang's possible first visit to Japan next month since taking office in 2013.

After that, Akiba said, he also met with Wang for about an hour.

Japan is seeking to host an annual trilateral summit involving the two countries and South Korea around Dec. 19 in Tokyo.

But the outlook of the summit being arranged by the end of this year has become increasingly uncertain, because of political turmoil in South Korea.

South Korean President Park Geun Hye, who has been hit hard by a corruption and influence-peddling scandal for a month, said Tuesday she is prepared to resign before her term ends if demanded by parliament and on condition that a smooth transition of power is ensured.

The two meetings took place a day after Akiba and Kong co-hosted a security dialogue involving diplomats and defense officials of the two countries for the first time since March 2015.