The Qing paid a massive indemnity to Japan , which led to Japan 's withdrawal .
Eventually , the Japanese withdrew just before the Qing dynasty sent 3 divisions of forces ( 9000 soldiers ) to reinforce Taiwan .
History of Taiwan