Soon after, Portuguese ships started sailing to Japan as regular trade freighters, thus increasing the contact and trade relations between Japan and the rest of the world, and particularly with mainland China, with whom Japan had previously severed its commercial and political ties, mainly due to a number of incidents involving Wokou piracy in the South China Sea, with the Portuguese now serving as intermediaries between the two Asian countries. Despite the mutual advantages derived from these trading contacts, which would soon be acknowledged by all parties involved, the lack of a proper seaport in Kyūshū for the purpose of harboring foreign ships posed a major problem for both merchants and the Kyushu daimyo (feudal lords) who expected to collect great advantages from these intercourse with the Portuguese.

The little harbor village quickly grew into a diverse port city[citation needed], and Portuguese products imported through Nagasaki (such as tobacco, bread, textiles and a Portuguese sponge-cake called castellas) were assimilated into popular Japanese culture. Tempura derived from a popular Portuguese recipe originally known as peixinho-da-horta, and takes its name from the Portuguese word, 'tempero' another example of the enduring effects of this cultural exchange. The Portuguese also brought with them many goods from China.

Due to the instability during the Sengoku period, Sumitada and Jesuit leader Alexandro Valignano conceived a plan to pass administrative control over to the Society of Jesus rather than see the Catholic city taken over by a non-Catholic daimyo. Thus, for a brief period after 1580, the city of Nagasaki was a Jesuit colony, under their administrative and military control. It became a refuge for Christians escaping maltreatment in other regions of Japan.[3] In 1587, however, Toyotomi Hideyoshi's campaign to unify the country arrived in Kyūshū. Concerned with the large Christian influence in southern Japan, as well as the active and what was perceived as the arrogant role the Jesuits were playing in the Japanese political arena, Hideyoshi ordered the expulsion of all missionaries, and placed the city under his direct control. However, the expulsion order went largely unenforced, and the fact remained that most of Nagasaki's population remained openly practicing Catholic.

In 1596, the Spanish ship San Felipe was wrecked off the coast of Shikoku, and Hideyoshi learned from its pilot[4] that the SpanishFranciscans were the vanguard of an Iberian invasion of Japan. In response, Hideyoshi ordered the crucifixions of twenty-six Catholics in Nagasaki on February 5 of that year (i.e. the "Twenty-six Martyrs of Japan"). Portuguese traders were not ostracized, however, and so the city continued to thrive.

Some of Nagasaki's stone bridges over the Nakashima River in the 1870s.

In 1602, Augustinian missionaries also arrived in Japan, and when Tokugawa Ieyasu took power in 1603, Catholicism was still tolerated. Many Catholic daimyo had been critical allies at the Battle of Sekigahara, and the Tokugawa position was not strong enough to move against them. Once Osaka Castle had been taken and Toyotomi Hideyoshi's offspring killed, though, the Tokugawa dominance was assured. In addition, the Dutch and English presence allowed trade without religious strings attached. Thus, in 1614, Catholicism was officially banned and all missionaries ordered to leave. Most Catholic daimyo apostatized, and forced their subjects to do so, although a few would not renounce the religion and left the country for Macau, Luzon and Japantowns in Southeast Asia. A brutal campaign of persecution followed, with thousands of converts across Kyūshū and other parts of Japan killed, tortured, or forced to renounce their religion.[citation needed]

Catholicism's last gasp as an open religion, and the last major military action in Japan until the Meiji Restoration, was the Shimabara Rebellion of 1637. While there is no evidence that Europeans directly incited the rebellion, Shimabara Domain had been a Christian han for several decades, and the rebels adopted many Portuguese motifs and Christian icons. Consequently, in Tokugawa society the word "Shimabara" solidified the connection between Christianity and disloyalty, constantly used again and again in Tokugawa propaganda.[citation needed]

The Shimabara Rebellion also convinced many policy-makers that foreign influences were more trouble than they were worth, leading to the national isolation policy. The Portuguese, who had been previously living on a specially constructed island-prison in Nagasaki harbour called Dejima, were expelled from the archipelago altogether, and the Dutch were moved from their base at Hirado into the trading island. In 1720 the ban on Dutch books was lifted, causing hundreds of scholars to flood into Nagasaki to study European science and art. Consequently, Nagasaki became a major center of rangaku, or "Dutch Learning". During the Edo period, the Tokugawa shogunate governed the city, appointing a hatamoto, the Nagasaki bugyō, as its chief administrator.

Consensus among historians was once that Nagasaki was Japan's only window on the world during its time as a closed country in the Tokugawa era. However, nowadays it is generally accepted that this was not the case, since Japan interacted and traded with the Ryūkyū Kingdom, Korea and Russia through Satsuma, Tsushima and Matsumae respectively. Nevertheless, Nagasaki was depicted in contemporary art and literature as a cosmopolitan port brimming with exotic curiosities from the Western World.[5]

In 1808, during the Napoleonic Wars the Royal Navy frigate HMS Phaeton entered Nagasaki Harbor in search of Dutch trading ships. The local magistrate was unable to resist the British demand for food, fuel, and water, later committing seppuku as a result. Laws were passed in the wake of this incident strengthening coastal defenses, threatening death to intruding foreigners, and prompting the training of English and Russian translators.

The Tōjinyashiki (唐人屋敷) or Chinese Factory in Nagasaki was also an important conduit for Chinese goods and information for the Japanese market. Various colourful Chinese merchants and artists sailed between the Chinese mainland and Nagasaki. Some actually combined the roles of merchant and artist such as 18th century Yi Hai. It is believed that as much as one-third of the population of Nagasaki at this time may have been Chinese.[6]

With the Meiji Restoration, Japan opened its doors once again to foreign trade and diplomatic relations. Nagasaki became a free port in 1859 and modernization began in earnest in 1868. Nagasaki was officially proclaimed a city on April 1, 1889. With Christianity legalized and the Kakure Kirishitan coming out of hiding, Nagasaki regained its earlier role as a center for Roman Catholicism in Japan.[citation needed]

During the Meiji period, Nagasaki became a center of heavy industry. Its main industry was ship-building, with the dockyards under control of Mitsubishi Heavy Industries becoming one of the prime contractors for the Imperial Japanese Navy, and with Nagasaki harbor used as an anchorage under the control of nearby Sasebo Naval District. During World War II, at the time of the nuclear attack on August 9, 1945, Nagasaki was an important industrial city, containing both plants of the Mitsubishi Steel and Arms Works, the Akunoura Engine Works, Mitsubishi Arms Plant, Mitsubishi Electric Shipyards, Mitsubishi Steel and Arms Works, Mitsubishi-Urakami Ordnance Works, several other small factories, and most of the ports storage and trans-shipment facilities, which employed about 90% of the city's labor force, and accounted for 90% of the city's industry. These connections with the Japanese war effort made Nagasaki a major target for bombing by the Allies during the war.[7][8]

Mushroom cloud from the atomic explosion over Nagasaki at 11:02 a.m., August 9, 1945

For 12 months prior to the nuclear attack, Nagasaki had experienced five small-scale air attacks by an aggregate of 136 planes which dropped a total of 270 tons of high explosive, 53 tons of incendiary, and 20 tons of fragmentation bombs. Of these, a raid of August 1, 1945, was most effective, with few of the bombs hitting the shipyards and dock areas in the southwest portion of the city, several hitting the Mitsubishi Steel and Arms Works, and six bombs landing at the Nagasaki Medical School and Hospital, with three direct hits on buildings there. While the damage from these few bombs was relatively small, it created considerable concern in Nagasaki and a number of people, principally school children, were evacuated to rural areas for safety, thus reducing the population in the city at the time of the atomic attack.[7][9][10][11]

On the day of the nuclear strike on Thursday, August 9, 1945, the population in Nagasaki was estimated to be 263,000, which consisted of 240,000 Japanese residents, 10,000 Korean residents, 2,500 conscripted Korean workers, 9,000 Japanese soldiers, 600 conscripted Chinese workers, and 400 Allied POWs.[11] That day, the Boeing B-29 SuperfortressBockscar, commanded by MajorCharles Sweeney, departed from Tinian's North Field just before dawn, this time carrying a plutonium bomb code named "Fat Man". The primary target for the bomb was Kokura, with the secondary target, Nagasaki, if the primary target was too cloudy to make a visual sighting. When the plane reached Kokura at 9:44 a.m. (10:44 a.m. Tinian Time), the city was obscured by clouds and smoke, as the nearby city of Yawata had been firebombed on the previous day. Unable to make a bombing attack on visual due to the clouds and smoke and with limited fuel, the plane left the city at 10:30 a.m. for the secondary target. After 20 minutes, the plane arrived at 10:50 a.m. over Nagasaki, but the city was also concealed by clouds. Desperately short of fuel and after making a couple of bombing runs without obtaining any visual target, the crew was forced to use radar in order to drop the bomb. At the last minute, the opening of the clouds allowed them to make visual contact with a racetrack in Nagasaki, and they dropped the bomb on the city's Urakami Valley midway between the Mitsubishi Steel and Arms Works in the south, and the Mitsubishi-Urakami Ordnance Works in the north.[12] After 53 seconds of its release, the bomb exploded at 11:02 a.m. at an approximate altitude of 1,800 feet.[13] This was the second and, to date, the last use of nuclear weaponry in combat, and also the second detonation of a plutonium bomb. The first was tested in central New Mexico, USA.

Within less than a second after the detonation, the north of the city was destroyed. Roughly 39,000–80,000 people were killed. About half of these died immediately, while the other half suffered lingering deaths.[14][15] Among the deaths were 6,200 out of the 7,500 employees of the Mitsubishi Munitions plant, and thousands of others (including 2,000 Koreans) who worked in other war plants and factories in the city, as well as 150 Japanese soldiers. The industrial damage in Nagasaki was high, partly owing to the advertent targeting of the industrial zone, leaving 68–80 percent of the non-dock industrial production destroyed. The bomb was somewhat more powerful than the "Little Boy" bomb dropped over Hiroshima, but because of Nagasaki's more uneven terrain, there was less damage.[16][17][18][19]

One-legged torii, Sannō Shrine, Nagasaki, Japan. The other half was toppled in the explosion of the nuclear bomb.

The city was rebuilt after the war, albeit dramatically changed. The pace of reconstruction was slow. The first simple emergency dwellings were not provided until 1946. The focus on redevelopment was the replacement of war industries with foreign trade, shipbuilding and fishing. This was formally declared when the Nagasaki International Culture City Reconstruction Law was passed in May 1949.[20] New temples were built, as well as new churches owing to an increase in the presence of Christianity.[21] Some of the rubble was left as a memorial, such as a one-legged torii at Sannō Shrine and an arch[which?] near ground zero. New structures were also raised as memorials, such as the Atomic Bomb Museum. Nagasaki remains first and foremost a port city, supporting a rich ship building industry and setting a strong example of perseverance and peace.

Nagasaki lies at the head of a long bay which forms the best natural harbor on the island of Kyūshū. The main commercial and residential area of the city lies on a small plain near the end of the bay. Two rivers divided by a mountain spur form the two main valleys in which the city lies. The heavily built-up area of the city is confined by the terrain to less than 4 square miles (10 km2).

Nagasaki has the typical humid subtropical climate of Kyūshū and Honshū, characterized by mild winters and long, hot, and humid summers. Apart from Kanazawa and Shizuoka it is the wettest sizeable city in Japan and indeed all of temperate Eurasia. In the summer, the combination of persistent heat and high humidity results in unpleasant conditions, with wet-bulb temperatures sometimes reaching 26 °C (79 °F). In the winter, however, Nagasaki is drier and sunnier than Gotō to the west, and temperatures are slightly milder than further inland in Kyūshū. Since records began in 1878 the wettest month has been July 1982 with 1,178 millimetres (46 in) including 555 millimetres (21.9 in) in a single day, whilst the driest month has been September 1967 with 1.8 millimetres (0.07 in). Precipitation occurs year-round, though winter is the driest season; rainfall peaks sharply in June & July. August is the warmest month of the year.