After the war the Dutch were on the backfoot as they had been delayed in the re-occupation of NEI, while the newly proclaimed Republik of Indonesia had used the vacuum to firmly establish themselves on the main islands of Java and Sumatra
From that weakened position the Dutch had been willing to initial negotiations with the Indonesians and this had led to the Linggadjati Agreement, named after the village on Java where the negotiations took place. It was signed in November 1946.
Under this agreement the Netherlands recognised Republican self-rule over Java, Sumatra and Madura. The Netherlands kept control over the rest of the archipelago known as the State of Borneo and the Great Eastern State.
The Netherlands Indies, together with the Netherlands, Suriname, and the Netherlands Antilles, would form a Netherlands-Indonesian Union with the Dutch monarch as official head of this Union.
As the Dutch started to increase their military presence in Indonesia, they became less inclined to stick to the agreement. In the end different interpretations on both sides stopped it from being implemented.