Image copyright Reuters Image caption It's been a difficult year for Moon Jae-in (left) and Shinzo Abe

The leaders of South Korea and Japan have met in an attempt to improve ties after a difficult period in their countries' bilateral relationship.

President Moon Jae-in and PM Shinzo Abe held talks as part of a group summit with Chinese Premier Li Keqiang in the Chinese city of Chengdu.

Disputes over trade and World War Two compensation have damaged relations in recent months.

This was the first formal meeting between the two for more than a year.

Mr Moon and Mr Abe met for 45 minutes, longer than the planned 30.

"Japan and South Korea are historically and culturally the closest neighbours, and very big, important partners on people-to-people exchanges," Mr Moon said.

He said he hoped differences could be sorted through dialogue, as the nations had a relationship that could not be set apart "even when there's some discomfort for a while".

But Mr Abe struck a tougher tone, saying it was Seoul's responsibility to come up with measures to resolve bilateral disputes.

The two leaders also discussed North Korea, amid concerns that the North is planning a "Christmas gift" - which analysts believe could be a missile test - if the US does not make concessions in nuclear talks.

A satellite image has emerged in recent days of a new structure being built at a site where North Korea makes military equipment used to launch long-range missiles.

Why have South Korea-Japan ties worsened?

In 2018, South Korea's top court ordered a Japanese firm to compensate Koreans it used as forced labour in World War Two.

The issue has angered many in South Korea, with people boycotting Japanese goods. One man smashed up his Japanese-made car.

Media playback is unsupported on your device Media caption A man smashed up his Japanese-made car in protest at the trade dispute

It's also led to a flare up in tensions over a group of islands claimed by both countries.

The Japanese government stuck to its line, saying all reparation issues had been settled by a 1965 treaty that established diplomatic relations between the two countries.

Then, in August 2019, Japan announced it was going to remove Seoul's favoured trade partner status and imposed export controls on its important electronics sector - vital for South Korean companies like Samsung.

Seoul then announced it had decided to end the country's intelligence-sharing pact because of the decision. However, it cancelled this decision last month in what seemed like a sign that tensions were diminishing.

What's the background?

The two nations share a complicated history. They have fought on and off since at least the 7th Century, and in 1910 Japan annexed Korea, turning the territory into a colony.

By the late 1930s, Japan started forcing people to work in the factories and mines, or enlist as soldiers.

It also sent tens of thousands of women from across Asia - many of them Korean - into military brothels to service Japanese soldiers. The victims became known as "comfort women".

Japan's rule of Korea ended in 1945 when it was defeated in the war.

But it took another 20 years before South Korean President Park Chung-hee agreed to normalise relations with the country in exchange for hundreds of millions of dollars in loans and grants.