Qing dynasty
With Zaifeng gone, Yuan Shikai and his Beiyang commanders effectively dominated Qing politics. He reasoned that going to war would be unreasonable and costly, especially when noting that the Qing government had a goal for constitutional monarchy. Similarly, Sun Yat-sen's government wanted a republican constitutional reform, both aiming for the benefit of China's economy and populace. With permission from Empress Dowager Longyu, Yuan Shikai began negotiating with Sun Yat-sen, who decided that his goal had been achieved in forming a republic, and that therefore he could allow Yuan to step into the position of President of the Republic of China.

Q: Who negotiated with Yuan Shikai to prevent war?
Sun Yat-sen