Allen was the first mayor of Galveston, Texas, and was elected for the post first in 1839. He was mayor for three non-consecutive periods, his last term ending in 1846. He became a party to a charter war in 1840 when he transported the Galveston archives to his home. He withstood a challenge by Samuel May Williams and other persons with financial interests in the Galveston City Company. Allen commandeered two cannons to guard his home and the municipal archives, though they were returned to the city and Allen resumed his term as mayor.[2][3]