In mid-1763, French Governor Jean-Jacques Blaise d'Abbadie granted a trade monopoly over the west upper Mississippi region to Gilbert Antoine de St. Maxent, a New Orleans merchant. Maxent quickly engaged the service of Jean Francois Le Dee and Pierre Laclède to build trading posts in the Illinois Country. Fur trading was becoming a more lucrative profession and many more started to travel up the Mississippi River for the same reason. Shortly before the upriver departure of Laclède in August 1763, word arrived that France had ceded its territory on the east bank of the Mississippi to Great Britain according to the Treaty of Paris (1763), giving new significance to the trading posts on the west bank. The group led by Laclède included his young stepson Auguste Chouteau and roughly twenty boatmen with a cargo of trade merchandise.
On November 3, 1763, the group arrived at Ste. Genevieve and Fort de Chartres, where they stored their merchandise while preparing to build a new settlement farther north. They had to act quickly as the midwest brutal winter was setting in. In December, Laclède and Chouteau scouted potential locations on the west bank, with Laclède determining the suitability of a site with a gentle slope ending in a rocky bluff above the river's floodwaters. Laclède marked the area and instructed Chouteau to return in the spring to clear the land for construction. The men returned to Fort de Chartres for the winter to recruit workers, but in February, Laclède sent Chouteau and 30 men to begin construction of cabins and a shed for supplies. The settlement was established on February 15, 1764.
Laclède himself arrived in April 1763 to inspect the site, at which point he named the village St. Louis and provided detailed plans for laying out streets and for construction of his headquarters. The plan of the village was similar to that of New Orleans, including a public marketplace centered on the riverfront and a grid street pattern. The market, Laclède's headquarters, and a church stood in a line of blocks west from the bank of the river, and the market block was separated from the river by a limestone block ledge. Three streets ran parallel to the river: First Street (also known as La Rue Royale, La Grande Rue, and Main Street), Second Street (also known as La Rue d'Eglise or Church Street), and Third Street (also known as La Rue des Granges or Barn Street). North of the market block and perpendicular to the river was Market Street (also known as La Rue de la Place or La Rue Bonhomme); south of the market block were Walnut Street (also known as La Rue de la Tour) and Chestnut Street (also known as La Rue Missouri). In addition, many prominent, intelligent figures, such as Madame Marie-Therese Chouteau, had moved to St. Louis, and with their keen eye and intelligence, was able to advise the new residents on how to best prosper in the local government and home.
The settlement began to gain French Creole residents from Cahokia and Fort de Chartres quickly during 1763 and 1764 due to fear of poor treatment by British soldiers who were sent to Illinois after the Treaty of Paris. As the primary civil and business leader in the village, Laclède awarded lots to the new settlers. Soon, it became one of the most emigrated to cities in the United States, with some forty families moving there from east bank settlements. In October 1765, the transfer of the east bank to the United Kingdom was completed, and the French Lieutenant Governor Louis St. Ange de Bellerive officially moved the upper Louisiana capital to St. Louis. After his arrival, St. Ange was responsible for awarding lots, and land transfers began to be recorded in Livres Terriens (land books). By 1770, St. Ange had awarded eighty-one lots, which encompassed nearly all of the village's forty-nine available blocks.
Although Spain nominally gained control of Louisiana according to the secret Treaty of Fontainebleau in 1762, the first Spanish governor of the territory, Antonio de Ulloa, arrived in New Orleans only in March 1766. Ulloa did not rule for long, however, and was expelled from New Orleans by French colonists in the Louisiana Rebellion of 1768. He was replaced as governor by Alejandro O'Reilly, who suppressed the rebellion and who appointed Don Pedro Piernas as lieutenant governor of upper Louisiana in August 1769. The French commandant of the village, St. Ange, transferred formal control to Piernas on May 20, 1770, and St. Ange was named assistant to Piernas and special adviser on Indian affairs. After the transfer, Piernas confirmed St. Ange's and Laclède's land grants and rented Laclède's headquarters as government offices, and Spanish soldiers provided local security.
Early landowners in St. Louis were required to enclose their lots with wooden or stone fencing for security reasons, and lots contained sheds, barns, vegetable gardens and sometimes fruit trees. No retail or commercial district existed, and business generally was conducted in homes or in the market square. Houses ranged from one-room huts to large, multiroom buildings such as Laclède's stone headquarters. Most homes, however, were square, of poteaux-en-terre construction, and with steep oak shingle roofs with long overhangs in typical Creole design. The residents depended on common land south of the town for firewood and pasture land, which extended from Third Street west nearly three miles, north to Mill Creek, and south for several miles until the 1790s when it was truncated for the new settlement of Carondelet, Missouri. The commons were continually reduced in size after the mid-1780s due to land grants to new settlers, and the remaining land not granted became Lafayette Park in 1838. In addition to access to the commons, each lot owner was granted individual use of a field strip measuring one arpent wide and forty arpents long. Each strip was part of a larger group of fields that were platted at the same time; a total of four such fields were created between 1766 and 1769, and by the 1790s nearly 6,000 acres were under cultivation around St. Louis. In spite of this agriculture, fur trading was the major focus of many residents.
Although the villagers were nominally Roman Catholic, they were not inclined toward religiosity. Upon the arrival of Piernas to St. Louis in 1769, there was no church and no enforcement of laws relating to religious observances. Within a month after taking office from St. Ange in May 1770, Piernas had urged the residents to build a log chapel on the church block, which was dedicated by Father Pierre Gibault of Kaskaskia on June 24, 1770. Gibault officiated at the chapel regularly in spite of being under the authority of the bishop of Quebec and being a British subject, and he performed dozens of masses and sixty-four baptisms until 1772. In May 1772, a Capuchin priest named Valentine became the first resident priest in St. Louis (although he technically was the chaplain to the Spanish garrison), and through early 1776 he baptized 64 French, 24 blacks, and 19 Indians, and he officiated at 72 funerals and 4 weddings. The estate of former commandant St. Ange contributed funds toward the building of a new church in 1774, but it was delayed by the death of its carpenter until mid-1776. In May 1776, Valentine was replaced by another Capuchin, Father Bernard de Limpach, who became the first pastor of the St. Louis parish, and with this and the completion of the new church building, Catholic religious observance became a customary component of life in St. Louis.
Among the earliest problems confronting the Spanish commanders of St. Louis was the issue of Indian slavery, which was abolished by a decree written by Spanish Governor O'Reilly and published by Piernas in May 1770. However, the ban was openly violated by St. Louisans during the summer of 1770, and Piernas requested guidance from the new Spanish governor, Luis de Unzaga (who had taken office in March 1770 after O'Reilly retired to Havana). The new governor and Piernas interpreted the abolishment by agreeing to halt further purchases of Indian slaves but allowing the retention of current slaves and any children born to them. These Indian slaves generally were replaced by African slaves via manumission, although some remained in bondage until the 1830s when freedom suits led to final Indian emancipation. In 1772, a census determined the population of the village to be 577, including 444 whites (285 males and 159 females) and 193 African slaves, with no Indian slaves reported due to their technical illegality.
Upon the promotion of Piernas to a new post in New Orleans in 1775, control of St. Louis passed to Lieutenant Colonel Francisco Cruzat, who continued the lax enforcement of Spanish policies common under Piernas. The population of the village increased to nearly 700, and in 1775, St. Louis merchants exported several hundred quintals of flour to New Orleans. In 1778, however, Cruzat was removed as commander of St. Louis upon the orders of Spanish Governor Bernardo Galvez, who was responding to British complaints that Cruzat had allowed Spanish agents to violate British territory in Illinois. The same year, Pierre Laclède, founder of St. Louis, died while returning from a trade expedition to New Orleans. Galvez replaced Cruzat with Fernando de Leyba, who moved the government offices from Laclède's former stone house and headquarters and sold the property to Auguste Chouteau.
Since the beginning of hostilities between the British and their American subjects, Spanish governors in New Orleans assisted the American rebels with weapons and ammunition. Along with his appointment as the new commander of St. Louis, Fernando de Leyba was instructed to abet any rebel Americans in British territory and recruit Catholics living in British territory to move to St. Louis. Upon his arrival in St. Louis, Leyba invited George Rogers Clark, an American colonel who was leading the Illinois campaign and had recently captured the town of Kaskaskia, to a two-day banquet and reception in his honor. Leyba also encouraged St. Louis merchants to supply Clark's forces with weapons and provided guarantees of credit for Clark.
By early 1779, the British commander Henry Hamilton had retaken the town of Vincennes, and his forces were advancing on Kaskaskia. Hamilton informed Leyba and Galvez that if American forces retreated to Spanish territory, he would pursue them there and attack Spanish forces, likely attacking St. Louis. However, Clark managed to defeat the British forces and capture Hamilton himself in February 1779, averting the threat to the town. After the entrance of Spain on the side of the Americans in June 1779, the British developed a strategy to attack St. Louis and other Spanish settlements along the Mississippi using fur traders and Indians.
The British force departed Prairie du Chien on May 2, 1780 with more than 200 traders and Indians. Prior to their departure, however, an American trader had alerted Leyba in St. Louis as to the plan, giving time to develop defensive measures around the town. Only one of four planned masonry towers was built, near the current intersection of Fourth and Walnut streets, and the rest of the town was surrounded by more than a mile of entrenchments. As a British force of nearly 1,000 approached in early May (augmented along its journey by more Indian forces), more than 150 militia took up positions in the fortifications around St. Louis.
On May 26, the British and Indian forces attacked the town of St. Louis, but were forced to retreat due to the fortifications and defections of some Indian forces. In spite of their defeat, the British attack destroyed much of St. Louis' agricultural lands and cattle stock, killed 23 residents, wounded 7, and captured 25 as prisoners. The battle losses and his inability to pay merchants for supplies given to the Americans damaged Leyba's reputation in St. Louis, and Leyba died after a lengthy illness on June 28, 1780. Galvez quickly reappointed former commander Francisco Cruzat, who arrived in St. Louis with ammunition, weapons and supplies to defend the town. In late 1780, Cruzat sent an expedition force from St. Louis to attack British forces at Fort St. Joseph, which successfully destroyed any future British plans to attack St. Louis or other Mississippi outposts.
After 1781, the British permanently evacuated the lands east of the Mississippi, leaving the land to the Americans. A lack of effective American government there led many remaining Creole families to emigrate to St. Louis from 1780 to 1783, bringing about a 19% increase in the population to about 900, not including slaves. Among these families was that of Gabriel Cerre and Charles Gratiot, merchants from Kaskaskia and Cahokia. Upon his arrival in St. Louis, Cerre was counted as the wealthiest merchant in the town, owning more than 850 acres of land around St. Louis and 6,000 acres along the Meramec River. Cerre's daughters married into the elite of Creole society, including eldest daughter Marie Anne who married Pierre-Louis Panet of Montreal in 1781; second daughter Marie Therese who married Auguste Chouteau, co-founder of St. Louis in 1786, and the youngest daughter Julia married Antoine Soulard, a surveyor who added significant property additions at the periphery of St. Louis.
Charles Gratiot, the second major merchant to relocate to St. Louis at the end of the American Revolution, also added to the wealth of the community. His English and trade skills allowed him to aid the Americans during the war, but in 1781, he relocated to the west bank, where he married Victoire Chouteau, daughter of Laclède and sister to Auguste Chouteau. During the 1790s, he conducted trade with Americans migrating west, and he also operated a mill and distillery on his farm to the west of the village. Eventually through land grants and purchases, Gratiot became one of the largest landowners in the area, with his primary farm stretching west from present-day Kingshighway Boulevard to far beyond the city limits to present-day Big Bend Boulevard, and from the northern edge of present-day Forest Park to Chippewa Avenue on the south. During his lifetime, Gratiot and his wife raised nine children to maturity in status and wealth (especially his son Charles Gratiot, a significant engineer and soldier), forming the basis of another group of St. Louis elites. The two merchant families of Gratiot and Cerre intermarried with the Chouteau family to create a society in the 1780s and 1790s that was dominated by French Creoles with marital ties to Spanish government officials, including lieutenant governors Piernas and Cruzat.
Throughout the 1790s, the area near St. Louis expanded as small farmers sold their lands to the Cerres, Gratiots, Soulards, or Chouteaus in St. Louis. These farmers moved to outlying towns founded after St. Louis, including Carondelet (originally called Delor's Village or Vide Poche), which was founded in 1767 by an ex-naval officer near the mouth of the River Des Peres. The village in 1796 had 181 residents, and it normally produced food surpluses for the area. Another of the area villages was St. Charles, which was founded on the north bank of the Missouri about 20 miles northwest of St. Louis. Its population in 1800 was roughly 600. The third major satellite village in the area, Florissant, was founded on the south bank of the Missouri about 15 miles northwest of St. Louis and had a population of nearly 300. By 1800, only 43% of the St. Louis district's population (excluding St. Charles district) lived within the village of St. Louis (1,039 of 2,447).
Some of these small farmers and artisans, upon hearing news of the successes of the French Revolution, began agititating in the late 1790s in support of French ideals. On September 22, 1796, a group of St. Louis artisans led a "noisy celebration" in support of a return of Louisiana to an egalitarian French government. In a show of strength, the Spanish governor sent a fleet of galleys and soldiers with military supplies to reinforce Spanish control of St. Louis.
However, even while the Spanish colonial officials were trying to maintain control of Louisiana, the Spanish government was attempting to transfer the territory to France. The Spanish government secretly returned the unprofitable Louisiana territory to France in October 1800 in the Treaty of San Ildefonso. After a promise by French leader Napoleon Bonaparte not to sell Louisiana without giving Spain the right of first refusal, the Spanish officially transferred control of Louisiana to France in October 1802. However, Spanish administrators remained in charge of St. Louis throughout the time of French ownership.
Upon the transfer of control, the Spanish administrator in New Orleans (upon Napoleon's orders) revoked the right of deposit for American merchants at New Orleans. This encouraged the United States under President Thomas Jefferson to send a team of negotiators to France in early 1803 with the purpose of gaining navigation rights on the Mississippi; however, Napoleon instead sold all of Louisiana, including St. Louis, to the United States on April 30, 1803, as part of the Louisiana Purchase. The treaty was ratified by the U.S. Senate in November 1803, and the transfer of power from Spain was made official in St. Louis at a ceremony called Three Flags Day. On March 8, 1804, the flag of Spain was lowered at the government buildings in St. Louis and, according to local tradition, the flag of France was raised. On March 10, 1804, the French flag was replaced by the flag of the United States.