The end of apartheid in Zimbabwe comes to mind, but that's a pretty poor example considering how things turned out since
Japan and West Germany.
Ingredients for success:
The Korean War (1950-53)
This is not a perfect example -- it doesn't quite fit your conditions of "invasion" -- however it is similar enough in other respects as to be applicable, and so useful to your query.
The Korean War was a military intervention by outside powers, subsequent warring, resulting in the formation of new governments, one of which (South Korea) became a stable and successful democracy with a vibrant economy.
Possible reasons for the success of this example, as opposed to the countless negative examples, might be: the support of local populace in the war effort and the real desire on their part for outside assistance; the united nature of that populace, its cohesiveness and lack of major ethnic / religious / political divide (discounting North-South); the time period, not long after WWII, was one in which democracy was seen very much in a positive light, having been on the winning side of that global conflict.
This submission has been removed because it violates the rule on poll-type questions. These poll-type questions do not lend themselves to answers with a firm foundation in sources and research, and the resulting threads usually turn into monsters with enormous speculation and little focussed discussion. “Most”, “least”, "best" and "worst" questions usually lead to vague, subjective, and speculative answers. If you'd like, you may PM /u/caffarelli to have your question considered for an upcoming Tuesday Trivia thread.