At first, the war went badly for the government, and the LTTE ended up in possession of Jaffna and most of the northern province. The army counterattacked with an offensive that threatened to retake the city, at the cost of many civilian casualties. Jayewardene had to halt the offensive after pressure from India pushed for a negotiated solution to the conflict. Jayewardene and Indian Prime Minister Rajiv Gandhi finally concluded the Indo-Sri Lanka Accord, which provided for devolution of powers to Tamil dominated regions, an Indian peacekeeping force in the north, and the demobilization of the LTTE.