Factory was the common name during the medieval and early modern eras for an entrepôt – which was an early form of free-trade zone or transshipment point. At a factory, local inhabitants could interact with foreign merchants, often known as factors.Webster's Encyclopedic Unabridged Dictionary of the English Language, Portland House, New York, 1983. A factory could serve simultaneously as a market, warehouse, customs house, and defense post; it also supported navigation and exploration, often acting as a headquarters or de facto government for local communities.

The factory system had its origins in medieval Flanders, where it evolved from establishments for foreign merchants during inter-European trade into overseas institutions between European trade with Asia and Africa. The factories established by European states in Africa, Asia and the Americas from the 15th century onward also tended to be official political dependencies of those states. These have been seen, in retrospect, as the precursors of colonial expansion.

The etymology of factory has its origins in the Greek pandocheion (pandοxeίο) from which the Arabic funduq and Latin transliteration fondaco evolved from during the late antiquity period. The Latin factorium means 'place of doers, makers' (Portuguese: feitoria; Dutch: factorij; French: factorerie, comptoir).

Hanseatic kontor origins (c. 1300s)

European colonialism traces its roots from the classical era, when Phoenicians, Greeks and Romans established colonies of settlement around the Mediterranean, but ancient Greek and Phoenician emporia () also operated non-settlement trading posts, specialising on trade in (for example) grain, slaves and luxury goods with hinterland peoples. Originally, factories were organizations of European merchants from a state, meeting in a foreign place. These organizations sought to defend their common interests, mainly economic (as well as organized insurance and protection), enabling the maintenance of diplomatic and trade relations within the foreign country where they were set.

The factories were established from 1356 onwards in the main trading centers, usually ports or central hubs that prospered under the influence of the Hanseatic League and its guilds and its kontors (larger trading-posts). The Hanseatic cities had their own law system and furnished their own protection and mutual aid. Because foreigners were not allowed to buy land in these cities, merchants clustered around factories, like the Portuguese in their Bruges factory: the factor(s) and the officers rented the housing and warehouses, arbitrated trade, and even managed insurance funds, working both as an association and an embassy, even administering justice within the merchant community.Diogo Ramada Curto, Francisco Bethencourt, "O tempo de Vasco da Gama", DIFEL, 1998, Later, cities like Bruges and its succeeding post Antwerp actively tried to take over the monopoly of trade from the Hansa, inviting foreign merchants to join in.

Locations The four major kontores of the League were:

Bruges (later moved to Antwerp), Belgium London, England Bergen, Norway Novgorod, Russia

Other European factories (both Hanseatic and non-Hanseatic):

Polotsk Belarus Boston, England King's Lynn, England Ipswich, England Kingston upon Hull, England Newcastle upon Tyne, England Great Yarmouth, England Bristol, England York, England Åbo, Finland Herford, Germany Fondaco dei Tedeschi, Italy Fondaco dei Turchi, Italy Kaunas, Lithuania Tønsberg, Norway Pskov Republic, Russia Leith, Scotland

Portuguese feitorias (c. 1400s)

During the territorial and economic expansion of the Age of Discovery, the factory was adapted by the Portuguese and spread throughout from West Africa to Southeast Asia.Diffie 1977, pp. 314–315 The Portuguese feitorias were mostly fortified trading posts settled in coastal areas, built to centralize and thus dominate the local trade of products with the Portuguese kingdom (and thence to Europe). They served simultaneously as market, warehouse, support to the navigation and customs and were governed by a feitor ("factor") responsible for managing the trade, buying and trading products on behalf of the king and collecting taxes (usually twenty percent).

The first Portuguese feitoria overseas was established by Henry the Navigator in 1445 on the island of Arguin, off the coast of Mauritania. It was built to attract Muslim traders and monopolize the business in the routes traveled in North Africa. It served as a model for a chain of African feitorias, Elmina Castle being the most notorious.

Between the 15th and 16th centuries, a chain of about 50 Portuguese forts either housed or protected feitorias along the coasts of West and East Africa, the Indian Ocean, China, Japan, and South America. The main factories of the Portuguese East Indies, were in Goa, Malacca, Ormuz, Ternate, Macao, and the richest possession of Bassein, which grew into Bombay (Mumbai). These feitorias were mainly driven by the trade of gold and slaves on the coast of Guinea, spices in the Indian Ocean, and sugar cane in the New World. They were also used for local triangular trade between several territories, like Goa-Macau-Nagasaki, trading products such as sugar, pepper, coconut, timber, horses, grain, feathers from exotic Indonesian birds, precious stones, silks and porcelain from the East, among many other products. In the Indian Ocean, the trade in Portuguese factories was enforced and increased by a merchant ship licensing system: the cartazes.Diffie 1977, pp. 320–322

From the feitorias, the products went to the main outpost in Goa, then to Portugal where they were traded in the Casa da Índia, which also managed exports to India.Diffie 1977, p. 316 There they were sold, or re-exported to the Royal Portuguese Factory in Antwerp, where they were distributed to the rest of Europe.

Easily supplied and defended by sea, the factories worked as independent colonial bases. They provided safety, both for the Portuguese, and at times for the territories in which they were built, protecting against constant rivalries and piracy. They allowed Portugal to dominate trade in the Atlantic and Indian oceans, establishing a vast empire with scarce human and territorial resources. Over time, the feitorias were sometimes licensed to private entrepreneurs, giving rise to some conflict between abusive private interests and local populations, such as in the Maldives.

Locations Feitoria da Mina, Ghana Arguin, Mauritania Fort (Colombo) (later ceded to Dutch, then British), Sri Lanka

Dutch factorij (c. 1600s)

Other European powers began to establish factories in the 17th century along the trade routes explored by Portugal and Spain, first the Dutch and then the English. They went on to establish in conquered Portuguese feitorias and further enclaves, encroaching into Portuguese monopoly across the coasts of Africa, Arabia, India, and South East Asia in search of the source of the lucrative spice trade.

Factories were then established by chartered companies such as the Dutch East India Company (VOC), founded in 1602, and the Dutch West India Company (WIC), founded in 1621. These factories provided for the exchange of products among European companies, local populations, and the colonies that often started as a factory with warehouses. Usually these factories had larger warehouses to fit the products resulting from the increasing agricultural development of colonies, which were boosted in the New World by the Atlantic slave trade.

In these factories, the products were checked, weighed, and packaged to prepare for the long sea voyage. In particular, spices, cocoa, tea, tobacco, coffee, sugar, porcelain, and fur were well protected against the salty sea air and against deterioration. The factor was present as the representative of the trading partners in all matters, reporting to the headquarters and being responsible for the products’ logistics (proper storage and shipping). Information took a long time to reach the company headquarters, and this was dependent on an absolute trust.

Locations Colachel, India Kozhikode (formerly Portuguese, later ceded to British), India Machilipatnam, India Fort Victoria, Indonesia Dejima, Japan Cape Town, South Africa Fort Orange (New Netherland), United States Fort Santo Domingo (formerly Spanish), Taiwan Fort Zeelandia, Taiwan Mokha, Yemen

British factories (c. 1600s–1700s) As English traders began taking an active role in the global market (particularly towards Eastern products), they were required to pursue colonial policies in order to compete with the likes of Spain, Portugal, Holland, and France. This struggle for commercial and colonial dominance would continue throughout the sixteenth and eighteenth centuries. In Europe, English factories were set up in Venice and Hamburg, where eventually the traders displaced those of the Hanse and Italy.

Overseas, the English East India Company (EIC) made direct Eastern connections, and the company resold Eastern products such as spices, indigo, textiles, and silks to other European countries for great profit. In 1616, the EIC landed its first factory in the town of Surat in Mughal India, consisting of a trading post, warehouse, and residence. This was followed by another in Isfahan, Iran in 1617. In the seventeenth century, the company shifted its focus to the exports of tea, silk, and porcelain from China in exchange for silver, Bengal cotton, and eventually opium. Initial attempts to set up longterm factories in Thailand, Malaysia, and Japan were unsuccessful; stations in Taiwan and China fared better.

In North America, Europeans began to trade with Natives during the 16th century. Colonists established factories on Native American territory, where they were also known as trading posts. These factories often played a strategic role, sometimes operating as forts to provide a degree of protection for colonists and their allies from hostile Indigenous people and competition from other European countries.

York Factory was founded by the chartered Hudson's Bay Company in 1697. It was headquarters of the company for a long time, and was once the de facto government in Rupert's Land and other parts of North America, prior to establishment of permanently-governed settled colonies. York factory controlled the fur trade throughout much of British-controlled North America for several centuries and undertook early exploration. Its traders and trappers forged early relationships with Indigenous peoples in Canada. The network of trading posts that it spawned formed the nucleus for later official authority in many areas of Western Canada and the United States. But at least initially it depended on those with furs to come to its location on the shore of Hudson Bay.York Factory's initial coastal factory model contrasted with the system of the French at Montreal, who established an extensive system of inland posts and sent traders to live among Indigenous people. When war broke out between France and England in the 1680s, the two nations regularly sent expeditions to raid and capture each other's fur trading posts. In March 1686, the French sent a raiding party under Chevalier des Troyes over to capture the company's posts along James Bay. In 1697, Pierre Le Moyne d'Iberville, commander of the company's captured posts, defeated three ships of the Royal Navy in the Battle of the Bay on his way to capture York Factory by a ruse. York Factory changed hands several times in the next decade and was finally granted to he HBC permanently in the 1713 Treaty of Utrecht. After the treaty, the Hudson Bay Company rebuilt York Factory as a brick star fort at the mouth of the nearby Hayes River, its present location.

Locations Overseas locations of EIC factories: Canton, China Surat, India Bengkulu, Indonesia Isfahan, Iran Hirado, Japan Saint Helena