Poland, steeped in bad memories of the 1939 invasion and decades of Soviet dominance after World War II, is a firm backer of Ukraine’s defense against Russia. But a flare-up over their own bloody history is threatening Polish-Ukrainian ties at a crucial time -- and could have wide repercussions.

Despite deep divisions over World War II history, both leaders stressed that countering Russia remains their shared strategic priority.

Poland, steeped in bad memories of the 1939 invasion and decades of Soviet dominance after World War II, is a firm backer of Ukraine’s defense against Russia. But a flare-up over…