When the Northern Expedition arrived in Nanjing, a series of anti-foreigner riots broke out in the city, with the ensuing chaos bringing the expedition's advance to a halt as Chiang blamed the Communists for instigating the incident. In April 1927, the Four Elders determined that the actions of the CCP were counter-revolutionary and urged Chiang Kai-shek to initiate a purge of the leftists, culminating in the Shanghai massacre, during which thousands of communists were arrested and killed, effectively ending the First United Front. Despite this causing a split between Chiang's right-wing government in Najing and Wang Jingwei's left-wing government in Wuhan, further unrest between the two parties and Soviet interference in the Wuhan government caused Wang to himself initiate a purge of communists from his own ranks. The Wuhan government subsequently re-unified with the Nationalist government in Nanjing, on the condition that Chiang resigned from his post. However, following the suppression of a number of communist uprisings in Nanchang, Hunan and Guangzhou, Chiang Kai-shek retook power from Wang Jingwei, who went into exile in Europe.