After the era of the Javanese kingdoms, Kediri went into decline, becoming a small rural settlement, which was later annexed by the Dutch East India Company (VOC) as part of the Dutch conquest of Java. East Java in the 1740s was controlled by Cakraningrat IV, a Madurese regent who was favorably disposed toward the VOC, as he believed the Dutch would help him in securing the independence of Madura from the Kasunanan Kartasura kingdom. However, when his plans were rejected by the VOC, Cakraningrat rise against the Europeans. The rebellion was ultimately suppressed by the VOC, assisted by two generals sent by Pakubuwana II, Sunan Kartasura. Kediri then became part of the VOC and remained under Dutch control until the independence of Indonesia in 1945.