A.K. Gani was born in Palembayan,
West Sumatra, west of
Bukittinggi, on 16 September 1905. The son of a teacher, he finished his early studies in Bukittinggi in 1923 before going to Batavia (modern-day
Jakarta), first for his secondary studies and then to study medicine. He graduated from
STOVIA (), a school for prospective doctors, in 1926. Gani has been active in politics and social organisations since his teenage years. He was a member of several groups for
native youth, including
Jong Java and Jong Sumatera. By the late 1920s, he had several enterprises running, including a boarding house and book reseller. This revenue enabled him to donate funds to the Youth Congress of 1928, where the
Youth Pledge was first read and "
Indonesia Raya" (the national anthem of Indonesia) was first played; Gani also attended this conference. In 1931 he joined Partindo, which had split off from the
Indonesian National Party (, or PNI) shortly after
Sukarno's arrest by the colonial government. Gani became acquainted with Sukarno after the latter's release from prison the following year and joined the
Indonesian Political Federation with him. Long interested in theatre, in 1941 Gani starred in Union Film's
Asmara Moerni after being invited by the film's director,
Rd. Ariffien. At the time the country's film industry was beginning to cater to well-educated audiences. Although some of the audience considered Gani's involvement in
Asmara Moerni as besmirching the independence movement, Gani considered it necessary to improve how the people viewed local productions. The film, the only one Gani ever made, was a commercial success. That year Gani received his medical degree. After the
Japanese occupied the Indies in 1942, Gani refused to collaborate. As such, he was arrested in September 1943 and held until October of the following year. He spent the rest of the occupation as a private practitioner. == National revolution ==