After the country's independence and during the ensuing revolution, Gani gained greater political power while also serving with the military. From 1945 to 1947 he was the commissioner for the PNI in South Sumatra, also serving on the party's board. He also coordinated military efforts in the province. He considered Palembang a viable economic powerhouse for the newly independent nation, arguing that with oil they could gather international support. He negotiated sales with international interests, including the Dutch-owned Shell while smuggling weapons and military supplies past the Dutch blockade. He had numerous connections in the Chinese community in Singapore, which assisted him in these tasks.