We study the exit path from a general domain after the last visit to a set of a Markov chain with rare transitions. We prove several large deviation principles for the law of the succession of thecycles visited by the process (the cycle path), the succession of the saddle points gone through to jump from cycle to cycle on the cycle path (the saddle path) and the succession of all the pointsgone through (the exit path). We estimate the time the process spends in each cycle of the cycle path and how it decomposes into the time spent in each point of the exit path. We describe asystematic method to find the most likely saddle paths. We apply these results to the reversible case of the Metropolis dynamics. We give in appendix the corresponding large deviation estimatesin the non homogeneous case, which are corollaries of already published works by Catoni (1992) and Trouvé (1992, 1996a).