Importance sampling is a Monte Carlo technique where random data are
sampled from an alternative "sampling distribution" and an unbiased
estimator is obtained by likelihood ratio weighting. Here we consider
estimation of large deviations probabilities via importance sampling. Previous
works have shown, for certain special cases, that "exponentially
twisted" distributions possess a strong asymptotic optimality property as
a sampling distribution. The results of this paper unify and generalize the
previous special case results. The analysis is presented in an abstract
setting, so the results are quite general and directly applicable to a number
of large deviations problems. Our main motivation, however, is to attack sample
path problems. To illustrate the application to this class of problems, we
consider Mogulskii type sample path problems in some detail.