After Arias' death in 1988, Endara became a leading opponent of the Manuel Noriega military dictatorship, heading the opposition coalition in the 1989 presidential election. Though his coalition was judged by international observers as having defeated pro-Noriega candidate Carlos Duque, the results were annulled by the government, and Endara and his running mates were attacked in the streets by the paramilitary Dignity Battalions. The assaults received widespread coverage in international media, helping to build support within the U.S. for military action against Noriega. Seven months later, the United States invaded Panama. Endara was sworn in as the new president on the first night of the invasion on a U.S. military base.