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 Campaignfighting. 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 detainees captured during Operation Barbarossa. The camp was run by Schutzstaffel 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.
At first inmates were detained on the premises of the original prison, but in 1942 an extra barracks had to be built to enlarge capacity. Grini was used primarily for Norwegian political prisoners, but the detention of more regular criminals followed. Many were held at Grini before being shipped to camps in Germany; 3,402 people in total passed through the camp en route to camps in Germany itself. Similarly, many teachers who took part in the civil disobedience of 1942 were held at Grini for one day before being taken to Kirkenes via Jørstadmoen. A small number of foreign citizens were also held there. Altogether, 19,247 prisoners passed through Grini, and at most (in February 1945) there were 6,208, although not all of these actually sat at Grini at a given time.
The total number killed at Grini is unknown, though the Gestapo and police often used the area for purposes of torture and at least eight people were executed there. British airborne troops sent by glider to sabotage the Norsk Hydro heavy-water plant during Operation Freshmancrashed in Norway due to foul weather. The five uninjured survivors were taken prisoner and held at Grini concentration camp until 18 January 1943, when they were taken to nearby woods, blindfolded and shot in the back of the head by the Gestapo. This was a war crime, in breach of the Geneva Convention. Executions normally took place at Akershus Fortress or Trandumskogen.
Other than guards, the German occupiers devoted few personnel to the camp. Since many politicians, academics and cultural personalities were detained at Grini, a certain level of internal organization was established. Prisoners worked in manufacturing, agriculture and other manual labor. Much of this manual labor took place outside the camp. Some detainees maintained their pre-war specialties, such as literary historian Francis Bull who secretly held several lectures, and managed to publish three books with material written during his three-year stay at Grini.
The diet at Grini was poor. After the war, it caused a certain stir in the populace when it was perceived that Nazi prisoners of the liberated Norway were treated better than prisoners of the Nazi regime; among other things the diet in Norwegian prisons was much better. On the other hand, Grini was more hospitable to resistance prisoners than the similar camps in Germany.
On 7 May 1945 Harry Söderman, who was in charge of the education of the Norwegian police troops in Sweden, arrived in the camp and ordered commander Zeidler to arrange an assembly, first for the 5,000 male prisoners, and then for the 500 females. The women were released immediately, while the male detainees were asked to stay in the camp for a few days until transport could be arranged, and leadership of the camp was handed over to the prisoners' representatives. Prisoners from Møllergata 19 and Victoria Terrasse were transferred to Grini the same day.
After the liberation of Norway in May 1945, the prison was used for Norwegians tried or convicted of treason or collaboration, as a part of thelegal purge in Norway after World War II. Since the name "Grini" was now associated with the Norwegian resistance movement, hence seen as heroic, the camp was renamed Ilebu. The new name also reflected the actual location of the camp better. 3,440 people were imprisoned here in July 1945. The conditions in the camp were unhealthy, with beri-beri breaking out in the summer. A guard reported that punitive exercise was used in a harsh way. on 13 October 1945 Utrykningspolitiet performed a razzia. During the razzia, prosecutor Lauritz Jenssen Dorenfeldt and the wife of camp director Helge Gleditsch were wrongly rounded up in the yard.
It was closed in 1951 but reopened in the same year under the name Ila as a "landsfengsel og sikringsanstalt" (national prison and security institution), a prison for criminals serving long-term sentences.
Much of the camp, including the barracks, has been torn down. One preserved barracks building today stands at Kadettangen. There is also a museum, the Grini Museum, near today's Ila prison. The preserved barracks was moved back in 2010.