1917, Konstantin Treffner, H. Treffner's first cousin once removed, became the director of the school. During the German occupation of Estonia in 1918, the school switched to teaching in Estonian. The same year, Hugo Treffner Gymnasium and Tartu Alexander Gymnasium were merged and in February 1919, the school got a new home, where it is situated to this day. During the merge, the school gained the inventory and library of Alexander Gymnasium. In the Estonian War of Independence, 230 students of Hugo Treffner Gymnasium were drafted, seven were killed in battle. In 1921, the school had 1,019 students; however that number was halved in the next 10 years, mainly due to the government's policy to promote trade schools over secondary education. The school began accepting students based on quality, not quantity. This led to Hugo Treffner Gymnasium becoming one of Estonia's most prestigious schools. Since 1923, the school officially had 2 branches: H. Treffner Primary School and H. Treffner Gymnasium. In 1933, the school celebrated its 50th birthday, which was attended by notable Estonian public figures, such as Jaan Tõnisson, Jüri Jaakson, Konstantin Päts, and others. Mr. Päts, the Estonian head of state, specifically praised the school and stated in his speech, "We could doubt if we, in our nation’s life, would have made it this far, if it weren’t for Treffner Gymnasium." With the education reform of 1934, the school was divided into a primary school (forms 1–4), middle school (forms 5–9) and gymnasium (forms 10–12). In 1937, the middle school was further divided into a progymnasium following a 4-year primary school education (forms 5–9) and a secondary science school following a 6-year primary school education (forms 7–9). The gymnasium would still accept students from either. During the first Estonian Republic, the school had nine official clubs: a drama club, a humanities club, an abstinence group, a classical arts club, a chess club, music, sport, a religious-ethical group and a natural sciences club. Since 1926, the school paper Miilang was circulated. With the Soviet annexation of Estonia in 1940, Hugo Treffner Primary School was closed, and Hugo Treffner Progymnasium, Hugo Treffner Secondary Sciences School and Hugo Treffner Gymnasium were merged into Tartu Secondary School No. 4. Johannes Valgma was appointed the new director. During the German occupation of 1941–1944, this school was closed and on 2 January 1942, Hugo Treffner Gymnasium was reopened, under the leadership of August Raielo.