Two prominent examples are Viet Nam and Indonesia.
Viet Nam elected Nguyễn Sinh Cung (aka Ho Chi Minh) during their long-ass war (1945-1975, basically). So America created a puppet government in the southern part to challenge. I'm simplifying things, but essentially America's involvement in Viet Nam was an illegal invasion, as were the overtures into Cambodia and Laos.
Indonesia was even worse, in many ways. Sukarno was the legitimate president of Indonesia. However, his anti-imperialist slant and desire to stay neutral during the Cold War prompted the US to contribute to a military coup d'etat that replaced him with one of his generals, Suharto. Suharto stayed the dictator (with US support) until 1998. So, as these cases show, if the US doesn't get its way, it spells trouble for you if you are a developing country.