From "The Private Life of Chairman Mao" by Li Zhu-sui, who was Mao's personal physician. Commenting on the visit of the Japanese prime Minister Tanaka to Beijing in 1972.
Mao credited Japan with the communist victory in the civil war. If Japan had not invaded China in the 1930s, the communists and the nationalists would never have cooperated in the struggle against the Japanese aggressors, and the communists would have remained too weak to seize power. Japanese aggression, he maintained, was a bad thing that had been transformed into good, for which the Chinese communists should be grateful.
When Tanaka tried to apologise for his country’s invasion of China, Mao assured him that it was the “help” of the Japanese invasion that made the communist victory possible.