Question: How long did the country that warned Gaddafi of a possible counter-coup in 1970, continue to maintain control over the state capital after the Treaty of Guadalupe Hidalgo?

full_context: Document 1: Muammar Gaddafi: In 1977, Gaddafi dissolved the Republic and created a new socialist state, the Jamahiriya ("state of the masses"). Officially adopting a symbolic role in governance, he retained power as military commander-in-chief and head of the Revolutionary Committees responsible for policing and suppressing opponents. Overseeing unsuccessful border conflicts with Egypt and Chad, Gaddafi's support for foreign militants and alleged responsibility for the Lockerbie bombing led to Libya's label of "international pariah". A particularly hostile relationship developed with the United States and United Kingdom, resulting in the 1986 U.S. bombing of Libya and United Nations-imposed economic sanctions. Rejecting his earlier ideological commitments, from 1999 Gaddafi encouraged economic privatization and sought rapprochement with Western nations, also embracing Pan-Africanism and helping to establish the African Union. Amid the Arab Spring, in 2011 an anti-Gaddafist uprising led by the National Transitional Council (NTC) broke out, resulting in the Libyan Civil War. NATO intervened militarily on the side of the NTC, bringing about the government's downfall. Retreating to Sirte, Gaddafi was captured and killed by NTC militants.
Document 2: Chihuahua (state): President Juárez once again based his government in the state of Chihuahua and it served as the center for the resistance against the French invasion throughout Mexico. On March 25, 1866, a battle ensued in the Plaza de Armas in the center of Chihuahua City between the French imperial forces that were guarding the plaza and the Republican forces led by General Terrazas. Being completely caught off guard, the French imperial forces sought refuge by bunkering themselves in the Cathedral of the Holy Cross, Our Lady of Regla, and St Fancis of Assisi and made it almost impossible to penetrate their defenses. General Terrazas then decided to fire a heavy artillery barrage with 8 kg cannonballs. The first cannon fired hit a bell in the tower of the church, instantly breaking it in half; soon after, 200 men of the imperial army forces surrendered. The republican forces had recovered control over the state capital. The bell in the church was declared a historical monument and can be seen today in the Cathedral. By April 1866, the state government had established a vital trading route from Chihuahua City to San Antonio, Texas; the government began to replenish their supplies and reinforce their fight against the Imperial forces.
Document 3: Treaty of Guadalupe Hidalgo: With the defeat of its army and the fall of its capital, Mexico entered into negotiations to end the war. The treaty called for the U.S. to pay US $15 million to Mexico and to pay off the claims of American citizens against Mexico up to US $5 million. It gave the United States the Rio Grande as a boundary for Texas, and gave the U.S. ownership of California and a large area comprising roughly half of New Mexico, most of Arizona, Nevada, and Utah, and parts of Wyoming and Colorado. Mexicans in those annexed areas had the choice of relocating to within Mexico's new boundaries or receiving American citizenship with full civil rights.
Document 4: Muammar Gaddafi: Moving to reduce Italian influence, in October 1970 all Italian-owned assets were expropriated and the 12,000-strong Italian community expelled from Libya alongside a smaller number of Jews. The day became a national holiday. Aiming to reduce NATO power in the Mediterranean, in 1971 Libya requested that Malta cease to allow NATO to use its land for a military base, in turn offering them foreign aid. Compromising, Malta's government continued allowing NATO use of the island, but only on the condition that they would not use it for launching attacks on Arab territory. Orchestrating a military build-up, the RCC began purchasing weapons from France and the Soviet Union. The commercial relationship with the latter led to an increasingly strained relationship with the U.S., who were then engaged in the Cold War with the Soviets.
Document 5: Mexico City: During this battle, on September 13, the 4th Division, under John A. Quitman, spearheaded the attack against Chapultepec and carried the castle. Future Confederate generals George E. Pickett and James Longstreet participated in the attack. Serving in the Mexican defense were the cadets later immortalized as Los Niños Héroes (the "Boy Heroes"). The Mexican forces fell back from Chapultepec and retreated within the city. Attacks on the Belén and San Cosme Gates came afterwards. The treaty of Guadalupe Hidalgo was signed in what is now the far north of the city.
Document 6: Muammar Gaddafi: The coup completed, the RCC proceeded with their intentions of consolidating the revolutionary government and modernizing the country. They purged monarchists and members of Idris' Senussi clan from Libya's political world and armed forces; Gaddafi believed this elite were opposed to the will of the Libyan people and had to be expunged. "People's Courts" were founded to try various monarchist politicians and journalists, and though many were imprisoned, none were executed. Idris was sentenced to execution in absentia.
Document 7: Muammar Gaddafi: After the 1969 coup, representatives of the Four Powers – France, the United Kingdom, the United States and the Soviet Union – were called to meet RCC representatives. The U.K. and U.S. quickly extended diplomatic recognition, hoping to secure the position of their military bases in Libya and fearing further instability. Hoping to ingratiate themselves with Gaddafi, in 1970 the U.S. informed him of at least one planned counter-coup. Such attempts to form a working relationship with the RCC failed; Gaddafi was determined to reassert national sovereignty and expunge what he described as foreign colonial and imperialist influences. His administration insisted that the U.S. and U.K. remove their military bases from Libya, with Gaddafi proclaiming that "the armed forces which rose to express the people's revolution [will not] tolerate living in their shacks while the bases of imperialism exist in Libyan territory." The British left in March and the Americans in June 1970.
Document 8: Chihuahua (state): 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.
Document 9: Muammar Gaddafi: In 1979, the U.S. placed Libya on its list of "State Sponsors of Terrorism", while at the end of the year a demonstration torched the U.S. embassy in Tripoli in solidarity with the perpetrators of the Iran hostage crisis. The following year, Libyan fighters began intercepting U.S. fighter jets flying over the Mediterranean, signalling the collapse of relations between the two countries. Libyan relations with Lebanon and Shi'ite communities across the world also deteriorated due to the August 1978 disappearance of imam Musa al-Sadr when visiting Libya; the Lebanese accused Gaddafi of having him killed or imprisoned, a charge he denied. Relations with Syria improved, as Gaddafi and Syrian President Hafez al-Assad shared an enmity with Israel and Egypt's Sadat. In 1980, they proposed a political union, with Libya paying off Syria's £1 billion debt to the Soviet Union; although pressures led Assad to pull out, they remained allies. Another key ally was Uganda, and in 1979, Gaddafi sent 2,500 troops into Uganda to defend the regime of President Idi Amin from Tanzanian invaders. The mission failed; 400 Libyans were killed and they were forced to retreat. Gaddafi later came to regret his alliance with Amin, openly criticising him.
Document 10: Treaty of Guadalupe Hidalgo: The Treaty of Guadalupe Hidalgo (Tratado de Guadalupe Hidalgo in Spanish), officially entitled the Treaty of Peace, Friendship, Limits and Settlement between the United States of America and the Mexican Republic, is the peace treaty signed on February 2, 1848, in the Villa de Guadalupe Hidalgo (now a neighborhood of Mexico City) between the United States and Mexico that ended the Mexican -- American War (1846 -- 48). The treaty came into force on July 4, 1848.
Document 11: Muammar Gaddafi: From childhood, Gaddafi was aware of the involvement of European colonialists in Libya; his nation was occupied by Italy, and during the North African Campaign of World War II it witnessed conflict between Italian and British troops. According to later claims, Gaddafi's paternal grandfather, Abdessalam Bouminyar, was killed by the Italian Army during the Italian invasion of 1911. At World War II's end in 1945, Libya was occupied by British and French forces. Although Britain and France intended on dividing the nation between their empires, the General Assembly of the United Nations (UN) declared that the country be granted political independence. In 1951, the UN created the United Kingdom of Libya, a federal state under the leadership of a pro-western monarch, Idris, who banned political parties and established an absolute monarchy.
Document 12: Mexican–American War: The 1848 Treaty of Guadalupe Hidalgo, forced onto the remnant Mexican government, ended the war and specified its major consequence, the Mexican Cession of the northern territories of Alta California and Santa Fe de Nuevo México to the United States. The U.S. agreed to pay $15 million compensation for the physical damage of the war. In addition, the United States assumed $3.25 million of debt already owed earlier by the Mexican government to U.S. citizens. Mexico acknowledged the loss of their province, later the Republic of Texas (and now the State of Texas), and thereafter cited and acknowledged the Rio Grande as its future northern national border with the United States. Mexico had lost over one - third of its original territory from its 1821 independence.
Document 13: Muammar Gaddafi: Idris' government was increasingly unpopular by the latter 1960s; it had exacerbated Libya's traditional regional and tribal divisions by centralising the country's federal system in order to take advantage of the country's oil wealth, while corruption and entrenched systems of patronage were widespread throughout the oil industry. Arab nationalism was increasingly popular, and protests flared up following Egypt's 1967 defeat in the Six-Day War with Israel; allied to the western powers, Idris' administration was seen as pro-Israeli. Anti-western riots broke out in Tripoli and Benghazi, while Libyan workers shut down oil terminals in solidarity with Egypt. By 1969, the U.S. Central Intelligence Agency was expecting segments of Libya's armed forces to launch a coup. Although claims have been made that they knew of Gaddafi's Free Officers Movement, they have since claimed ignorance, stating that they were monitoring Abdul Aziz Shalhi's Black Boots revolutionary group.
Document 14: Treaty of Guadalupe Hidalgo: The Treaty of Guadalupe Hidalgo (Tratado de Guadalupe Hidalgo in Spanish), officially titled the Treaty of Peace, Friendship, Limits and Settlement between the United States of America and the Mexican Republic, is the peace treaty signed on February 2, 1848, in the Villa de Guadalupe Hidalgo (now a neighborhood of Mexico City) between the United States and Mexico that ended the Mexican -- American War (1846 -- 1848). The treaty came into force on July 4, 1848.
Document 15: Chihuahua (state): 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.
ground_truth: three months
sub_queries: Who told Gaddafi about a possible counter-coup in 1970? Answer: U.S.
How long did the U.S. continue to maintain control over the state capital after the treaty? Answer: three months