In January 2011, Martin resigned as Foreign Minister in protest at the leadership of Brian Cowen. Following Cowen's own resignation as Leader of Fianna Fáil, Martin was quickly elected to replace him. Just weeks later, at the 2011 general election, Martin led Fianna Fáil to the worst result in its 85-year history, with a loss of 57 seats and a popular vote of just 17.4%. He nevertheless remained in the leadership, becoming Leader of the Opposition, with most party members choosing to blame Cowen rather than Martin for the result. At the 2016 general election, Fianna Fáil's performance improved significantly, more than doubling their representation in the Dáil. Martin continued as Leader of the Opposition and led his party through the 2020 general election, which led to Fianna Fáil becoming the largest party in the Dáil by just one seat.