During the administration of Governor Edmund J. Davis (1869-1873), the Republican government in Texas established a state militia to curb crimes by the KKK against African Americans, created a free public school system, and improved transportation infrastructure by issuing bonds for rail lines. However, this Republican leadership faced opposition from Democrats and accusations of corruption. Ultimately, the Democrats regained control of the legislature in 1873 after Richard Coke defeated Davis in election that Republicans argued had early poll closings. This marked the end of Republican rule in Texas for over 100 years.