During the 2000 presidential election he headed Stjepan Mesić's election campaign. Mesić won the election and later named Karamarko as his national security advisor and head of the National Security Office. In 2002 Karamarko was appointed director of the Counterintelligence Agency (POA) and in 2006 he was named director of the Security and Intelligence Agency (SOA).