paragraph_text: The president was indirectly elected by the people through the Electoral College to a six - year term, and was one of only two nationally elected Confederate officers, the other being the Vice President. On February 18, 1861, Jefferson Davis became president of the provisional government. On February 22, 1862, he became president of the permanent government and served in that capacity until being captured by elements of the United States Cavalry in 1865.

paragraph_text: The Confederate States Army (C.S.A.) was the military land force of the Confederate States of America (Confederacy) during the American Civil War (1861 - 1865). On February 28, 1861, the Provisional Confederate Congress established a provisional volunteer army and gave control over military operations and authority for mustering state forces and volunteers to the newly chosen Confederate president, Jefferson Davis (1808 - 1889). Davis was a graduate of the U.S. Military Academy on the Hudson River at West Point, New York, and colonel of a volunteer regiment during the Mexican -- American War (1846 - 1848). He had also been a United States Senator from Mississippi and U.S. Secretary of War in the administration of 14th President Franklin Pierce (1853 - 1857). On March 1, 1861, Davis assumed control of the military situation at Charleston, South Carolina on behalf of the Confederate States government, where South Carolina state militia threatened to seize Fort Sumter, an island fortification in Charleston harbor from the small U.S. Army garrison. By March 1861, the Provisional Confederate Congress expanded the provisional forces and established a more permanent Confederate States Army.

paragraph_text: Rear Admiral James Edward Jouett (7 February 1826 – 30 September 1902), known as "Fighting Jim Jouett of the American Navy", was an officer in the United States Navy during the Mexican–American War and the American Civil War. His father was Matthew Harris Jouett, a notable painter, and his grandfather was Revolutionary War hero Jack Jouett.

paragraph_text: The Confederacy was established in the Montgomery Convention in February 1861 (before Lincoln's inauguration in March) and was disintegrated in April and May 1865. It was formed by delegations from seven Southern slave states that had proclaimed their secession from the Union. After the fighting began in April, four additional slave states seceded and were admitted. Later, two states (Missouri and Kentucky) and two territories were given seats in the Confederate Congress.

paragraph_text: On 17 April 1861, five days after the Confederate attack on Fort Sumter, the legislature voted to secede from the United States and joined the Confederacy. Official action came in May, after the Confederacy promised to move its national capital to Richmond. The city was at the end of a long supply line, which made it somewhat difficult to defend, although supplies continued to reach the city by canal and wagon for years, since it was protected by the Army of Northern Virginia and arguably the Confederacy's best troops and commanders. It became the main target of Union armies, especially in the campaigns of 1862 and 1864-5.

paragraph_text: The Mexican -- American War, also known as the Mexican War in the United States and in Mexico as the American intervention in Mexico, was an armed conflict between the United States of America and the United Mexican States (Mexico) from 1846 to 1848. It followed in the wake of the 1845 American annexation of the independent Republic of Texas. Mexico had considerable instability under the caudillo leadership of President / General Antonio López de Santa Anna, with many constitutional changes leading up to the conflict. Mexico still considered Texas to be its northeastern province and a part of its territory, and did not recognize the Republic of Texas, which had seceded from Mexico in the 1836 Texas Revolution a decade earlier. In 1845, newly elected U.S. President James K. Polk sent troops to the disputed area, and a diplomatic mission to Mexico. After Mexican forces attacked American forces, Polk cited this in his request that Congress declare war.

paragraph_text: The Confederate States Army (C.S.A.) was the military ground force of the Confederate States of America (Confederacy) during the American Civil War (1861 - 1865). On February 28, 1861, the Provisional Confederate Congress established a provisional volunteer army and gave control over military operations and authority for mustering state forces and volunteers to the newly chosen Confederate president, Jefferson Davis (1808 - 1889), a graduate of the U.S. Military Academy on the Hudson River at West Point, New York, and colonel of a volunteer regiment during the Mexican -- American War (1846 - 1848), later a United States Senator from Mississippi and U.S. Secretary of War in the administration of 14th President Franklin Pierce (1853 - 1857). By March 1861, the Provisional Confederate Congress expanded the provisional forces and established a more permanent Confederate States Army.

paragraph_text: Charles Pomeroy Stone (September 30, 1824 – January 24, 1887) was a career United States Army officer, civil engineer, and surveyor. He fought with distinction in the Mexican–American War, earning two brevet promotions for his performance in the conflict. After resigning and surveying for the Mexican Government, he returned to the U.S. Army to fight in the American Civil War.

paragraph_text: The American Civil War caught both sides unprepared. The Confederacy hoped to win by getting Britain and France to intervene, or else by wearing down the North's willingness to fight. The U.S. sought a quick victory focused on capturing the Confederate capital at Richmond, Virginia. The Confederates under Robert E. Lee tenaciously defended their capital until the very end. The war spilled across the continent, and even to the high seas. Most of the material and personnel of the South were used up, while the North prospered.

paragraph_text: The White House of the Confederacy is a historic house located in the Court End neighborhood of Richmond, Virginia. Built in 1818, it was the main executive residence of the sole President of the Confederate States of America, Jefferson Davis, from August 1861 until April 1865. It was viewed as the Confederate States counterpart to the White House in Washington, D.C.

paragraph_text: The Mexican Revolution involved a civil war with hundreds of thousands of deaths and large numbers fleeing combat zones. Tens of thousands fled to the U.S. President Wilson sent U.S. forces to occupy the Mexican city of Veracruz for six months in 1914. It was designed to show the U.S. was keenly interested in the civil war and would not tolerate attacks on Americans, especially the April 9, 1914, "Tampico Affair", which involved the arrest of American sailors by soldiers of the regime of Mexican President Victoriano Huerta. In early 1916 Pancho Villa a Mexican general ordered 500 soldiers on a murderous raid on the American city of Columbus New Mexico, with the goal of robbing banks to fund his army. The German Secret Service encouraged Pancho Villa in his attacks to involve the United States in an intervention in Mexico which would distract the United States from its growing involvement in the war and divert aid from Europe to support the intervention. Wilson called up the state militias (National Guard) and sent them and the U.S. Army under General John J. Pershing to punish Villa in the Pancho Villa Expedition. Villa fled, with the Americans in pursuit deep into Mexico, thereby arousing Mexican nationalism. By early 1917 President Venustiano Carranza had contained Villa and secured the border, so Wilson ordered Pershing to withdraw.

paragraph_text: Thornton A. Jenkins (11 December 1811 – 9 August 1893) was an officer in the United States Navy, who served during the Mexican–American War and the American Civil War. He later served as Chief of the Bureau of Navigation and as President of the United States Naval Institute. Jenkins retired as a Rear Admiral.

paragraph_text: The Treaty of Guadalupe Hidalgo, signed on February 2, 1848, by American diplomat Nicholas Trist and Mexican plenipotentiary representatives Luis G. Cuevas, Bernardo Couto, and Miguel Atristain, ended the war, gave the U.S. undisputed control of Texas, and established the U.S.–Mexican border of the Rio Grande. As news of peace negotiations reached the state, new call to arms began to flare among the people of the state. But as the Mexican officials in Chihuahua heard that General Price was heading back to Mexico with a large force comprising several companies of infantry and three companies of cavalry and one division of light artillery from Santa Fe on February 8, 1848, Ángel Trías sent a message to Sacramento Pass to ask for succession of the area as they understood the war had concluded. General Price, misunderstanding this as a deception by the Mexican forces, continued to advance towards the state capital. On March 16, 1848 Price began negotiations with Ángel Trías, but the Mexican leader responded with an ultimatum to General Price. The American forces engaged with the Mexican forces near Santa Cruz de los Rosales on March 16, 1848. The Battle of Santa Cruz de los Rosales was the last battle of the Mexican–American War and it occurred after the peace treaty was signed. The American forces maintained control over the state capital for three months after the confirmation of the peace treaty. The American presence served to delay the possible succession of the state which had been discussed at the end of 1847, and the state remained under United States occupation until May 22, 1848.

paragraph_text: Shortly after Central America declared independence from the Spanish Empire, some of its countries were annexed by the First Mexican Empire in 1822 and then Central America formed the Federal Republic in 1823. From 1838 to 1840 the federation descended into civil war, with conservatives fighting against liberals and separatists fighting to secede. The various political factions were unable to overcome their ideological differences and the federation dissolved after a series of bloody conflicts.

paragraph_text: In 1860, North Carolina was a slave state, in which one-third of the population was enslaved. This was a smaller proportion than in many Southern states. The state did not vote to join the Confederacy until President Abraham Lincoln called on it to invade its sister state, South Carolina, becoming the last or second-to-last state to officially join the Confederacy. The title of "last to join the Confederacy" has been disputed; although Tennessee's informal secession on May 7, 1861, preceded North Carolina's official secession on May 20, the Tennessee legislature did not formally vote to secede until June 8, 1861.

paragraph_text: Tennessee is known as the "Volunteer State", a nickname some claimed was earned during the War of 1812 because of the prominent role played by volunteer soldiers from Tennessee, especially during the Battle of New Orleans. Other sources differ on the origin of the state nickname; according to the Columbia Encyclopedia, the name refers to volunteers for the Mexican–American War. This explanation is more likely, because President Polk's call for 2,600 nationwide volunteers at the beginning of the Mexican-American War resulted in 30,000 volunteers from Tennessee alone, largely in response to the death of Davy Crockett and appeals by former Tennessee Governor and now Texas politician, Sam Houston.

paragraph_text: Davis was born in Fairview, Kentucky, to a moderately prosperous farmer, the youngest of ten children. He grew up in Wilkinson County, Mississippi, and also lived in Louisiana. His eldest brother Joseph Emory Davis secured the younger Davis's appointment to the United States Military Academy. After graduating, Jefferson Davis served six years as a lieutenant in the United States Army. He fought in the Mexican–American War (1846–1848), as the colonel of a volunteer regiment. Before the American Civil War, he operated a large cotton plantation in Mississippi, which his brother Joseph gave him, and owned as many as 113 slaves. Although Davis argued against secession in 1858, he believed that states had an unquestionable right to leave the Union.

paragraph_text: The Battle of Contreras, also known as the Battle of Padierna, took place on 19–20 August 1847, in the final encounters of the Mexican–American War. In the Battle of Churubusco, fighting continued the following day.

paragraph_text: The United States Congress declared war on Mexico on May 13, 1846 after only having a few hours to debate. Although President José Mariano Paredes's issuance of a manifesto on May 23 is sometimes considered the declaration of war, Mexico officially declared war by Congress on July 7. After the American invasion of New Mexico, Chihuahua sent 12,000 men led by Colonel Vidal to the border to stop the American military advance into the state. The Mexican forces being impatient to confront the American forces passed beyond El Paso del Norte about 20 miles (32 km) north along the Rio Grande. The first battle that Chihuahua fought was the battle of El Bracito; the Mexican forces consisting of 500 cavalry and 70 infantry confronted a force of 1,100–1,200 Americans on December 25, 1846. The battle ended badly by the Mexican forces that were then forced to retreat back into the state of Chihuahua. By December 27, 1846, the American forces occupied El Paso Del Norte. General Doniphan maintained camp in El Paso Del Norte awaiting supplies and artillery which he received in February 1847.

paragraph_text: Confederate Arizona, commonly referred to as Arizona Territory, and officially the Territory of Arizona, was a territory claimed by the Confederate States of America during the American Civil War, between 1861 and 1865. Delegates to secession conventions had voted in March 1861 to secede from the New Mexico Territory and the United States, and seek to join the Confederacy. It consisted of the portion of the New Mexico Territory south of the 34th parallel, including parts of the modern states of New Mexico and Arizona. Its capital was Mesilla along the southern border. The Confederate territory overlapped the Arizona Territory later established by the Union government in 1863.

Question: When did the person chosen to be president of the confederacy end his fight in the Mexican-American war?
Answer: 1848