Relations between Japan and China were badly strained under former prime minister Junichiro Koizumi who repeatedly visited a controversial shrine to Japanese war dead.