  We derive a large deviation principle for the density profile of occupation
times of random interlacements at a fixed level in a large box of Z^d, with d
bigger or equal to 3. As an application, we analyze the asymptotic behavior of
the probability that atypically high values of the density profile insulate a
macroscopic body in a large box. As a step in this program, we obtain a similar
large deviation principle for the occupation-time measure of Brownian
interlacements at a fixed level in a large box of R^d, and we derive a new
identity for the Laplace transform of the occupation-time measure, which is
based on the analysis of certain Schr\"odinger semi-groups.
