were in port in Charleston, to prevent their coming into contact with slaves in the city. As this violated international treaties, the law caused conflict with the federal government. Hamilton upheld the state's right to make such a law, but it was declared unconstitutional. Hamilton gained increased restrictions on free blacks, with a state law that prohibited them from returning to the state to live if they left for any reason, and controls on slave worship and gatherings. He ordered the congregation of the AME Church to be dispersed, and the building destroyed. The minister Morris Brown thanked Hamilton for helping him escape the state; historian Robert L. Paquette credits Hamilton with helping contain white vigilantism. When South Carolina Congressman William Lowndes resigned from the U.S. Congress in May 1822, Hamilton was well known and had much public support. He was appointed to complete Lowndes' term, starting his congressional career on December 13, 1822, while still serving as mayor. He was elected to the U.S. House of Representatives in 1824 to a full term, and re-elected in 1826 and 1828, serving until 1829. He had led opposition to the administration of John Quincy Adams and opposed the Tariff Acts of 1824 and 1828. Increasingly at odds with the national government, Hamilton declined to be nominated for another term and returned to his home state to prepare for confrontation. Hamilton was elected by the state legislature as Governor of South Carolina in 1830, and built up the States' Rights and Free Trade Party. He led the state during the Nullification Crisis of 1832, when more than 80% of the state convention's 162 delegates voted to nullify the federal tariffs of 1828 and 1832. After Robert Y. Hayne was elected by the legislature to governor, he commissioned Hamilton as a brigadier general in the state's militia. Hamilton prepared for possibly defending the state against federal forces on nullification. Interested in supporting the expansion of slavery in western territories, Hamilton personally lent $216,000 to the young Republic of Texas in the 1830s. Subsequent to that, he made a number of poor business decisions, aggravated by the Panic of 1837, and leaving him deeply in debt for hundreds of thousands of dollars by 1839 – a condition often shared by other planters. Perhaps because his condition reminded them unpleasantly of their own, Hamilton's struggles with debt and poor decision-making caused a steep decline over