Hearst won two elections to Congress, then lost a series of elections. He narrowly failed in attempts to become mayor of New York City in both 1905 and 1909 and governor of New York in 1906, nominally remaining a Democrat while also creating the Independence Party. He was defeated for the governorship by Charles Evans Hughes. Hearst's unsuccessful campaigns for office after his tenure in the House of Representatives earned him the unflattering but short-lived nickname of "William 'Also-Randolph' Hearst", which was coined by Wallace Irwin.