In 2004, Endara broke with the Arnulfista party over differences of opinion with the party's leader, Panamanian president Mireya Moscoso, and accused the party of corruption. He ran in the 2004 presidential election as the candidate of the Solidarity Party, on a platform of reducing crime and government corruption. His primary rival was Democratic Revolutionary Party (PRD) candidate Martín Torrijos, son of the former military dictator Omar Torrijos. Martín Torrijos ran on a platform of strengthening democracy and negotiating a free trade agreement with the US, and was supported by popular musician and politician Ruben Blades. Endara finished second, receiving 31% of the vote to Torrijos' 47%.