On May 30, 2004, Wilder announced his intention to run for Mayor of Richmond. Until recently, the Richmond City Council chose the mayor from among its 9 members. The move to change this policy succeeded in November 2003 when voters approved a mayor-at-large referendum, with roughly 80 percent voting in favor of the measure. Wilder was a leading proponent of the mayor-at-large proposal.
On November 2, 2004, Wilder received 79% of the vote (55,319 votes) to become the first directly elected Mayor of Richmond in sixty years. Upon winning the election, Wilder communicated his intentions to take on corruption in the city government. He issued several ultimatums to the sitting City Council before he took office. He was sworn in on January 2, 2005.