The governor of Portuguese India Afonso de Albuquerque conquered the city of Malacca in 1511.

The port city of Malacca controlled the narrow, strategic Strait of Malacca, through which all seagoing trade between China and India was concentrated.The Cambridge History of the British Empire Arthur Percival Newton p. 11 The capture of Malacca was the result of a plan by King Manuel I of Portugal, who since 1505 had intended to beat the Castilians to the Far-East, and Albuquerque's own project of establishing firm foundations for Portuguese India, alongside Hormuz, Goa, and Aden, to ultimately control trade and thwart Muslim shipping in the Indian Ocean.João Paulo de Oliveira e Costa, Vítor Luís Gaspar Rodrigues (2012) Campanhas de Afonso de Albuquerque: Conquista de Malaca, 1511 p. 13

Having started sailing from Cochin in April 1511, the expedition would not have been able to turn around due to contrary monsoon winds. Had the enterprise failed, the Portuguese could not hope for reinforcements and would have been unable to return to their bases in India. At the time it was the farthest territorial conquest in history.João Paulo de Oliveira e Costa, Vítor Luís Gaspar Rodrigues (2012) Campanhas de Afonso de Albuquerque: Conquista de Malaca, 1511 p. 7

Background The first Portuguese references to Malacca appear after Vasco da Gama's return from his expedition to Calicut which opened a direct route to India around the Cape of Good Hope. It was described as a city that was a 40-day journey from India, where clove, nutmeg, porcelains, and silks were sold. It was supposedly ruled by a sovereign who could gather 10,000 men for war and was Christian.João Paulo de Oliveira e Costa, Vítor Luís Gaspar Rodrigues (2012) Campanhas de Afonso de Albuquerque: Conquista de Malaca, 1511 p. 13 Since then, King Manuel showed an interest in making contact with Malacca, believing it to be at, or at least close to, the antimeridian of Tordesillas.José Damião Rodrigues, Pedro Aires Oliveira (2014) História da Expansão e do Império Português ed. Esfera dos Livros In 1505 Dom Francisco de Almeida was dispatched by King Manuel I of Portugal as the first Viceroy of Portuguese India, tasked to discover its precise location, among other things.

Almeida, however, was unable to dedicate resources to the enterprise and sent only two undercover Portuguese envoys in August 1506, Francisco Pereira and Estevão de Vilhena, aboard a Muslim merchantship. The mission was aborted once they were detected and nearly lynched on the Coromandel Coast, narrowly making it back to Cochin by November.João Paulo de Oliveira e Costa, Vítor Luís Gaspar Rodrigues (2012) Campanhas de Afonso de Albuquerque: Conquista de Malaca, 1511 p. 17

City Malacca was founded at the start of the 15th century with all trade between China and India passing through the city. As a result of its ideal position, the city harboured many communities of merchants which included Arabs, Persians, Turks, Armenians, Birmanese, Bengali, Siamese, Peguans, and Luzonians, the four most influential being the Muslim Gujaratis and Javanese, Hindus from the Coromandel Coast, and Chinese. According to the Portuguese apothecary Tomé Pires, who lived in Malacca between 1512 and 1514, as many as 84 dialects were spoken in Malacca.Tomé Pires, Suma Oriental pp. 399, 422 The Portuguese factor Rui de Araújo said it had 10,000 homes. While Albuquerque estimated a population of 100,000, modern estimates place the population of the city at about 40,000.Luís Filipe F. Reis Thomaz (2000) Early Portuguese Malacca pp. 60–62 Damião de Góis estimated a lower population of 30,000. Malacca kept a group of captured cannibals from Daru to whom the perpetrators of serious crimes were fed.Brás de Albuquerque, 1557 The commentaries of the great Afonso Dalboquerque, second viceroy of India, edited by Walter de Grey Birch, 1875, ch. XVIII pg. 87

The city however was built on swampy grounds and surrounded by inhospitable tropical forest, and needed to import everything for its sustenance, such as vital rice, supplied by the Javanese. To supply its population, Malacca used at least 100 junks which annually imported rice from various locations: about 50–60 junks from Java, 30 from Siam, and 20 from Pegu.Reid, Anthony (1989). The Organization of Production in the Pre-Colonial Southeast Asian Port City. In Broeze, Frank (Ed.), Brides of the Sea: Asian Port Cities in the Colonial Era (pp. 54–74). University of Hawaii Press. Malacca was mainly a trading city without any substantial agricultural hinterlands. Ma Huan noted in the prior century: "All is sandy, saltish land. The climate is hot by day, cold by night. The fields are infertile and the crops poor; (and) the people seldom practice agriculture".

Malacca had about 10,000 buildings but most of them were made of straw, and only about 500 were made from adobe. They also lacked proper fortifications. Malacca had no wall except for bamboo stockades that were erected for temporary defense. This type of city was similar to Johor, Brunei, and Aceh. The richer merchants kept their trade goods by storing them in a gedong (godown) or stone warehouse, which were built partly below ground level. Ma Huan wrote:Whenever the treasure-ships of the Middle Kingdom (China) arrived there, they at once erected a line of stockading, like a city-wall, and set up towers for the watch-drums at four gates; at night they had patrols of police carrying bells; inside, again, they erected a second stockade, like a small city-wall, (within which) they constructed warehouses and granaries; (and) all the money and provisions were stored in them.According to Brás de Albuquerque, the son of Afonso de Albuquerque:

First contact with the Portuguese

Unimpressed with Almeida's results, in April 1508 King Manuel dispatched a fleet directly to Malacca, composed of four ships under the command of Diogo Lopes de Sequeira, who was also tasked with charting Madagascar and gathering information on the Chinese. Sequeira received royal orders specifically instructing him to obtain permission to open a trading post diplomatically and trade peacefully, not to respond to any provocations and not to open fire unless fired upon:

By April 1509, the fleet was in Cochin and Almeida, incorporated another carrack into the fleet to strengthen it. The decision was not entirely innocent, as aboard traveled several supporters of Almeida's political rival, Afonso de Albuquerque. Among its crewmen was also Ferdinand Magellan.Fernão Lopes de Castanheda, 1552–1561 História do Descobrimento e Conquista da Índia pelos Portugueses edited by Manuel Lopes de Almeida, Porto, Lello & Irmão, 1979, book 2 ch. 106

During the voyage, he was well treated by the kings of Pedir and Pasai who sent him presents. Sequeira erected crosses at both places. He cast anchor in the port of Malacca, where he terrified the people by the thunder of his cannon so that every one hastened on board their ships to endeavour to defend themselves. A boat came off with a message from the town, to ask who they were.

The expedition arrived in Malacca in September 1509 and immediately Sequeira sought to contact the Chinese merchants in the harbour. They invited him aboard one of their trade junks and received him very well for dinner and arranged a meeting with Sultan Mahmud. The Sultan promptly granted the Portuguese authorization to establish a feitoria and provided a vacant building for that purpose. However, wary of the threat that the Portuguese posed to their interests, the powerful merchant communities of Muslim Gujaratis and Javanese convinced Sultan Mahmud and the Bendahara to betray and capture the Portuguese.João Paulo de Oliveira e Costa, Vítor Luís Gaspar Rodrigues (2012) Campanhas de Afonso de Albuquerque: Conquista de Malaca, 1511 pp. 25–26

Sequeira in the meantime was so convinced of the Sultan's amiability that he disregarded the information that Duarte Fernandes, a New Christian who spoke Parsi, obtained from a Persian innkeeper about the ongoing preparations to destroy the fleet, confirmed even by the Chinese merchants.Fernão Lopes de Castanheda, 1552–1561 História do Descobrimento e Conquista da Índia pelos Portugueses edited by Manuel Lopes de Almeida, Porto, Lello & Irmão, 1979, book 2 ch. 114 He was playing chess aboard his flagship when the Malaccan fleet, disguised as merchants, ambushed the Portuguese ships.João de Barros, 1553, Décadas da Ásia decade 2, book 4, ch. 4 The Portuguese repelled every boarding attempt, but faced with the sheer number of Malaccan ships and unable to land any forces to rescue those Portuguese who had stayed in the feitoria, de Sequeira decided to sail back to India before the monsoon started and left them stranded in Southeast Asia. Before departing he sent a message to the Sultan and the Bendahara in the form of two captives each with an arrow through their skull as a testimony to what would happen to them should any harm come to the 20 Portuguese left behind, who surrendered.

Preparations for the conquest Upon reaching Travancore in April, Sequeira heard that Afonso de Albuquerque had succeeded Dom Francisco de Almeida as Governor of Portuguese India. Fearful of reprisals from Albuquerque for previously supporting Almeida, Sequeira promptly set sail back to Portugal.

At that same time, another smaller fleet under the command of Diogo de Vasconcelos arrived from Lisbon to trade directly with Malacca, dispatched by King Manuel on the assumption that de Sequeira had been successful in establishing commercial ties with the city. Vasconcelos arrived at Angediva Island in August 1510 where he found Albuquerque, resting his troops after failing to capture Goa some months prior, and revealed his intentions of sailing to Malacca immediately. Albuquerque had received messages from the captives at Malacca, written by the factor Rui de Araújo, and sent through envoys of the most powerful merchant of Malacca, a Hindu named Nina Chatu who interceded for the Portuguese. Araújo detailed the Sultan's military force, the strategic importance of Malacca as well as their atrocious captivity. They were kept chained in a dark and narrow prison, often half-starved and alternatively offered bribes and tortured to give up gunnery secrets or embrace Islam in exchange for freedom.Sanceau, 1936, p. 165. Some were forcibly circumcized.Danvers, 1894, p. 221. Albuquerque persuaded Vasconcelos to postpone his journey to Malacca and had him reluctantly aid him in capturing Goa later that year.João Paulo de Oliveira e Costa, Vítor Luís Gaspar Rodrigues (2012) Campanhas de Afonso de Albuquerque: Conquista de Malaca, 1511 pp. 30–36

With Goa firmly in Portuguese hands by December, Vasconcelos insisted that he be allowed to proceed to Malacca, which was denied due to the state of war in Malacca.Danvers, 1894, p. 218. Vasconcelos mutinied and attempted to set sail against the Governor's orders, for which he and his captains were arrested and his pilots hanged or condemned to solitary confinement. Albuquerque assumed direct command of the expedition and in April departed from Cochin along with 1,000 men and 18 ships.

The exact number of the Portuguese troops vary depending on the source. Cartas de Afonso de Albuquerque mentioned 700 Portuguese and 300 Malabarese auxiliaries. Giovanni da Empoli mentioned 1,500 Portuguese and 800 allies, including Chinese and Indian troops. Malay sources mention that the Portuguese had at least 2,000 soldiers. The Portuguese armada carried 400 guns.

Crossing of the Indian Ocean