Like his father, John Tyler strongly supported America's role in the war of 1812. As a young legislator in the Virginia House of Delegates, Tyler voted for every anti-British measure proposed during the 1812 session. In the summer of 1813, word reached Tyler that a British raiding party had plundered Hampton, Virginia, and appeared ready to march up the James River to Richmond. He immediately joined the Charles City Rifles, a local militia company formed to defend Richmond. A large part of the force consisted of farmers who were new to military discipline. Tyler, commissioned as a captain, organized the men through a simple drill system. The company was attached to the Fifty-second Regiment of the Virginia Militia and ordered Williamsburg to resist the advancing British. Tyler's company was later attached to the Second Elite Corps of Virginia under the command of General Moses Green. When the British withdrew from Hampton, Tyler and his men returned home triumphant. John Tyler became the 10th president of the United States in 1841.