Grini was originally built as a women's prison, near an old croft named "Ilen" (also written "Ihlen"), on land bought from the Løvenskiold family by the Norwegian state. The construction of a women's prison started in 1938, but despite being more or less finished in 1940, it did not come into use for its original purpose: Nazi Germany's invasion of Norway on 9 April 1940, during World War II, instead precipitated the use of the site for detention by the Nazi regime. At first, the Nazis used the prison to detain Norwegian officers captured during the Norwegian Campaign fighting. This use was discontinued in June 1940, when Norway capitulated. The prison was then used to house Wehrmacht soldiers until a concentration camp was established on 14 June 1941. The first detainees were sent from Åneby concentration camp, the use of which was at the same time discontinued. Shortly afterwards, the ranks of prisoners were increased by Soviet troops captured during Operation Barbarossa. The camp was run by Schutzstaffel (SS) and Gestapo personnel, who renamed the camp "Polizeihäftlingslager Grini". The name corresponds to a nearby farm and surrounding residential district located a short distance southeast of the camp, but historically the area at Ilen had no connection to Grini farm.