Shortly after the outbreak of World War I in 1914, Russian troops captured Allenstein, but it was recovered by the Imperial German Army in the Battle of Tannenberg.

After the defeat of Germany in World War I, the East Prussian plebiscite was held in 1920 to determine whether the populace of the region, including Allenstein, wished to remain in German East Prussia or become part of Poland, which had just regained independence.
In order to advertise the plebiscite, special postage stamps were produced by overprinting German stamps and sold on 3 April of that year.
One kind of overprint read PLÉBISCITE / OLSZTYN / ALLENSTEIN, while the other read TRAITÉ / DE / VERSAILLES / ART.
94 et 95 inside an oval whose border gave the full name of the plebiscite commission.
Each overprint was applied to 14 denominations ranging from 5 Pfennigs to 3 Marks.
The Polish community faced discrimination, Polish rallies were dispersed, the participants were threatened and beaten.
In March, Polish activist Bogumił Linka died in Olsztyn, a few weeks after being brutally beaten by the German militia in nearby Szczytno in Masuria.
He was buried in Olsztyn, however, his grave was soon devastated by local German nationalists.
A monument to Linka was unveiled after Poland regained control of the city after World War II.
The presence of a Royal Irish battalion ensured a relative peace in Allenstein.
The plebiscite, held on 11 July, produced 16,742 votes for Germany and 342 votes for Poland.

In the interwar period, numerous Polish organisations operated in the city, including the Polish Scouting and Guiding Association, Union of Poles in Germany, a People's Bank (Bank Ludowy), local Poles organised a school, library, puppet theatre.
The Polish Consulate also operated.
After the January 1933 Nazi seizure of power in Germany, Poles and Jews in Allenstein were increasingly persecuted.
In 1935, the German Wehrmacht made the city the seat of the Allenstein Militärische Bereich.
It was then home of the 11th and 217th infantry divisions and 11th Artillery Regiment.
At the same time, the football club SV Hindenburg Allenstein played in Allenstein from 1921 to 1945.
Beginning in 1936, members of the Polish minority, especially members of the Union of Poles in Germany, were persecuted, and after the 1939 German invasion of Poland that began World War II, Poles were subjected to mass arrests and executions or deportations to occupied Poland.
The Gazeta Olsztyńska was abolished by the German authorities, the newspaper's headquarters was demolished and the editor-in-chief Seweryn Pieniężny was arrested and executed in the Hohenbruch concentration camp.
During the war five forced labour camps were established in the city.
On 12 October 1939, the Wehrmacht established an Area Headquarters for a military district that controlled the environs of Allenstein, including Lötzen (now Giżycko), and Ciechanów in occupied Poland.

On 22 January 1945, near the end of the war, Allenstein was plundered and burned by the conquering Soviet Red Army, and much of its German population fled.
On 23 May 1945, Olsztyn became again part of Poland under border changes promulgated at the Potsdam Conference.
In October 1945, the remaining German population was expelled, to be replaced by new Polish settlers, mostly those expelled from pre-war Polish regions of Vilnius, Grodno and Volhynia, annexed by the Soviet Union, as well as settlers from Warsaw destroyed by the Germans.
Reconstruction and removal of damages lasted until the 1950s.
Shortly after the outbreak of World War I in 1914, Russian troops captured Allenstein, but it was recovered by the Imperial German Army in the Battle of Tannenberg.
After the defeat of Germany in World War I, the East Prussian plebiscite was held in 1920 to determine whether the populace of the region, including Allenstein, wished to remain in German East Prussia or become part of Poland, which had just regained independence. In order to advertise the plebiscite, special postage stamps were produced by overprinting German stamps and sold on 3 April of that year. One kind of overprint read PLÉBISCITE / OLSZTYN / ALLENSTEIN, while the other read TRAITÉ / DE / VERSAILLES / ART. 94 et 95 inside an oval whose border gave the full name of the plebiscite commission. Each overprint was applied to 14 denominations ranging from 5 Pfennigs to 3 Marks. The Polish community faced discrimination, Polish rallies were dispersed, the participants were threatened and beaten. In March, Polish activist Bogumił Linka died in Olsztyn, a few weeks after being brutally beaten by the German militia in nearby Szczytno in Masuria. He was buried in Olsztyn, however, his grave was soon devastated by local German nationalists. A monument to Linka was unveiled after Poland regained control of the city after World War II. The presence of a Royal Irish battalion ensured a relative peace in Allenstein. The plebiscite, held on 11 July, produced 16,742 votes for Germany and 342 votes for Poland.
In the interwar period, numerous Polish organisations operated in the city, including the Polish Scouting and Guiding Association, Union of Poles in Germany, a People's Bank (Bank Ludowy), local Poles organised a school, library, puppet theatre. The Polish Consulate also operated. After the January 1933 Nazi seizure of power in Germany, Poles and Jews in Allenstein were increasingly persecuted. In 1935, the German Wehrmacht made the city the seat of the Allenstein Militärische Bereich. It was then home of the 11th and 217th infantry divisions and 11th Artillery Regiment. At the same time, the football club SV Hindenburg Allenstein played in Allenstein from 1921 to 1945. Beginning in 1936, members of the Polish minority, especially members of the Union of Poles in Germany, were persecuted, and after the 1939 German invasion of Poland that began World War II, Poles were subjected to mass arrests and executions or deportations to occupied Poland. The Gazeta Olsztyńska was abolished by the German authorities, the newspaper's headquarters was demolished and the editor-in-chief Seweryn Pieniężny was arrested and executed in the Hohenbruch concentration camp. During the war five forced labour camps were established in the city. On 12 October 1939, the Wehrmacht established an Area Headquarters for a military district that controlled the environs of Allenstein, including Lötzen (now Giżycko), and Ciechanów in occupied Poland.
On 22 January 1945, near the end of the war, Allenstein was plundered and burned by the conquering Soviet Red Army, and much of its German population fled. On 23 May 1945, Olsztyn became again part of Poland under border changes promulgated at the Potsdam Conference. In October 1945, the remaining German population was expelled, to be replaced by new Polish settlers, mostly those expelled from pre-war Polish regions of Vilnius, Grodno and Volhynia, annexed by the Soviet Union, as well as settlers from Warsaw destroyed by the Germans. Reconstruction and removal of damages lasted until the 1950s.
Olsztyn