Gilan Province (Persian: استان گیلان, Ostān-e Gīlan) is one of the 31 provinces of Iran. It lies along the Caspian Sea, in Iran's Region 3, west of the province of Mazandaran, east of the province of Ardabil, and north of the provinces of Zanjan and Qazvin. It borders Azerbaijan (Astara District) in the north.
 The northern section of the province is part of the territory of South (Iranian) Talysh. At the center of the province is the city of Rasht, the capital of Gilan. Other cities include Astaneh-ye Ashrafiyeh, Astara, Fuman, Hashtpar, Lahijan, Langarud, Masuleh, Manjil, Rudbar, Rudsar, Shaft, Siahkal, and Sowme'eh Sara. The main port is Bandar-e Anzali, formerly known as Bandar-e Pahlavi.
 At the 2006 census, the province was home to 2,381,063 people in 669,221 households. The following census in 2011 counted 2,480,874 in 777,316 households. The latest census conducted in 2016 found Gilan to have a population of 2,530,696 people in 851,382 households.
 Early humans were present at Gilan since Lower Paleolithic. Darband Cave is the earliest known human habitation site in Gilan province; it is located in a deep tributary canyon of the Siah Varud and contains evidence for the earliest prehistoric human cave occupation during the Lower Paleolithic in Iran. 
 Stone artifacts and animal fossils were discovered by a group of Iranian archaeologists that dates back to the late Chibanian. Yarshalman is a Middle Paleolithic shelter that was probably occupied by Neanderthals about 40,000 to 70,000 years ago. Later Paleolithic sites in Gilan are Chapalak Cave and Khalvasht shelter.
 It seems that the Gelae, or Gilites, entered the region south of the Caspian coast and west of the Amardos River (now called the Sefid-Rud) in the second or first century BCE, Pliny identifies them with the Cadusii who were living there previously. It is more likely that they were a separate people, had come from the region of Dagestan, and taken the place of the Kadusii. That the native inhabitants of Gilan have some originating roots in the Caucasus is supported by genetics and language, as the Y-DNA of Gilaks most closely resemble that of Georgians and other South Caucasus peoples, while their mtDNA closely resembles other Iranian groups. Their languages shares typologic features with the languages of the Caucasus.
 Gilan province was the place of origin of the Ziyarid dynasty and Buyid dynasty in the mid-10th century.  Previously, the people of the province had a prominent position during the Sassanid dynasty through the 7th century, so that their political power extended to Mesopotamia.
 The first recorded encounter between Gilak and Deylamite warlords and invading Muslim armies was at the Battle of Jalula in 637 AD. Deylamite commander Muta led an army of Gils, Deylamites, Persians and people of the Rey region. Muta was killed in the battle, and his defeated army managed to retreat in an orderly manner.
 However, this appears to have been a Pyrrhic victory for the Arabs, since they did not pursue their opponents. Muslim Arabs never managed to conquer Gilan as they did with other provinces in Iran. Gilanis and Deylamites successfully repulsed all Arab attempts to occupy their land or to convert them to Islam. 
 In fact, it was the Deylamites under the Buyid king Mu'izz al-Dawla who finally shifted the balance of power by conquering Baghdad in 945. Mu'izz al-Dawla, however, allowed the Abbasid caliphs to remain in comfortable, secluded captivity in their palaces.
 The Church of the East began evangelizing Gilan in the 780s, when a metropolitan bishopric was established under Shubhalishoʿ. In the 9th and 10th centuries AD, Deylamites and later Gilanis gradually converted to Zaydi Shiʿism. 
 Several Deylamite commanders and soldiers of fortune who were active in the military theaters of Iran and Mesopotamia were openly Zoroastrian (for example, Asfar Shiruyeh a warlord in central Iran, and Makan, son of Kaki, the warlord of Rey) or were suspected of harboring pro-Zoroastrian (for example Mardavij) sentiments. Muslim chronicles of Varangian (Rus', pre-Russian Norsemen) invasions of the littoral Caspian region in the 9th century record Deylamites as non-Muslim. These chronicles also show that the Deylamites were the only warriors in the Caspian region who could fight the fearsome Varangian Vikings as equals.  Deylamite mercenaries served as far away as Egypt, al-Andalus, and in the Khazar Kingdom.
 The Buyids established the most successful of the Deylamite dynasties of Iran.
 In the 9th–11th century AD, there were repeated military raids undertaken by the Rus' between 864 and 1041 on the Caspian Sea shores of Iran, Azerbaijan, and Dagestan as part of the Caspian expeditions of the Rus'. Initially, the Rus' appeared in Serkland in the 9th century traveling as merchants along the Volga trade route, selling furs, honey, and slaves. The first small-scale raids took place in the late 9th and early 10th century. The Rus' undertook the first large-scale expedition in 913; having arrived on 500 ships, they pillaged the westernmost parts of Gorgan as well as Gilan and Mazandaran, taking slaves and goods.
 The Turkish invasions of the 10th and 11th centuries CE, which saw the rise of Ghaznavid and Seljuk dynasties, put an end to Deylamite states in Iran. From the 11th century CE to the rise of Safavids, Gilan was ruled by local rulers who paid tribute to the dominant power south of the Alborz range but ruled independently.
 In 1307 the Ilkhan Öljeitü conquered the region. This was the first time the region came under the rule of the Mongols after the Ilkhanid Mongols and their Georgian allies failed to do it in the late 1270s. After 1336, the region seemed to be independent again.
 Before the introduction of silk production (date unknown but a pillar of the economy by the 15th century AD), Gilan was a poor province. There were no permanent trade routes linking Gilan to Persia. There was a small trade in smoked fish and wood products. It seems that the city of Qazvin was initially a fortress-town against marauding bands of Deylamites, another sign that the economy of the province did not produce enough on its own to support its population. This changed with the introduction of the silk worm in the late Middle Ages.
 Gilan recognized twice, for brief periods, the suzerainty of the Ottoman Empire without rendering tribute to the Sublime Porte, in 1534 and 1591.
 The Safavid emperor, Shah Abbas I ended the rule of Khan Ahmad Khan (the last semi-independent ruler of Gilan) and annexed the province directly to his empire. From this point onward, rulers of Gilan were appointed by the Persian Shah. In the Safavid era, Gilan was settled by large numbers of Georgians, Circassians, Armenians, and other peoples of the Caucasus whose descendants still live or linger across Gilan. Most of these Georgians and Circassians are assimilated into the mainstream Gilaks. The history of Georgian settlement is described by Iskandar Beg Munshi, the author of the 17th century Tarikh-e Alam-Ara-ye Abbasi, and the Circassian settlements by Pietro Della Valle, among other authors.
 The Safavid empire became weak towards the end of the 17th century CE. By the early 18th century, the once-mighty empire was in the grips of civil war and uprisings. The ambitious Peter I of Russia (Peter the Great) sent a force that captured Gilan and many of the Iranian territories in the North Caucasus, Transcaucasia, as well as other territories in northern mainland Iran, through the Russo-Persian War (1722-1723) and the resulting Treaty of Saint Petersburg (1723). Gilan and its capital of Rasht, which was conquered between late 1722 and late March 1723, stayed in Russian possession for about ten years.
 Qajars established a central government in Persia (Iran) in the late 18th century CE. They lost a series of wars to Russia (Russo-Persian Wars 1804–1813 and 1826–28), resulting in an enormous gain of influence by the Russian Empire in the Caspian region, which would last up to 1946. The Gilanian cities of Rasht and Anzali were all but occupied and settled by Russians and Russian forces. Most major cities in the region had Russian schools and significant traces of Russian culture can be found today in Rasht. Russian class was mandatory in schools and the significant increase of Russian influence in the region lasted until 1946 and had a major impact on Iranian history, as it directly led to the Persian Constitutional Revolution.
 Gilan was a major producer of silk beginning in the 15th century CE. As a result, it was one of the wealthiest provinces in Iran. Safavid annexation in the 16th century was at least partially motivated by this revenue stream. The silk trade, though not the production, was a monopoly of the Crown and the single most important source of trade revenue for the imperial treasury. As early as the 16th century and until the mid 19th century, Gilan was the major exporter of silk in Asia. The Shah farmed out this trade to Greek and Armenian merchants and, in return, received a handsome portion of the proceeds.
 In the mid-19th century, a fatal epidemic among the silk worms paralyzed Gilan's economy, causing widespread economic distress. Gilan's budding industrialists and merchants were increasingly dissatisfied with the weak and ineffective rule of the Qajars. Re-orientation of Gilan's agriculture and industry from silk to production of rice and the introduction of tea plantations were a partial answer to the decline of silk in the province.
 After World War I, Gilan came to be ruled independently of the central government of Tehran and concern arose that the province might permanently separate. Before the war, Gilanis had played an important role in the Constitutional Revolution of Iran. Sepahdar-e Tonekaboni (Rashti) was a prominent figure in the early years of the revolution and was instrumental in defeating Mohammad Ali Shah Qajar.
 In the late 1910s, many Gilanis gathered under the leadership of Mirza Kuchik Khan, who became the most prominent revolutionary leader in northern Iran in this period. Khan's movement, known as the Jangal movement of Gilan, had sent an armed brigade to Tehran that helped depose the Qajar ruler Mohammad Ali Shah. However, the revolution did not progress the way the constitutionalists had strived for, and Iran came to face much internal unrest and foreign intervention, particularly from the British and Russian empires.
 During and several years after the Bolshevik Revolution, the region saw another massive influx of Russian settlers (the so-called White émigrées). Many of the descendants of these refugees are in the region. During the same period, Anzali served as the main trading port between Iran and Europe.
 The Jangalis are glorified in Iranian history and effectively secured Gilan and Mazandaran against foreign invasions. However, in 1920 British forces invaded Bandar-e Anzali, while being pursued by the Bolsheviks. In the midst of this conflict, the Jangalis entered into an alliance with the Bolsheviks against the British. This culminated in the establishment of the Persian Socialist Soviet Republic (commonly known as the Socialist Republic of Gilan), which lasted from June 1920 until September 1921.
 In February 1921 the Soviets withdrew their support for the Jangali government of Gilan and signed the Russo-Persian Treaty of Friendship (1921) with the central government of Tehran. The Jangalis continued to struggle against the central government until their final defeat in September 1921 when control of Gilan returned to Tehran.
 
 According to the 2016 census, 1,598,765 people (over 63% of the population of Gilan province) live in the following cities: Ahmadsargurab 2,128, Amlash 15,444, Asalem 10,720, Astaneh-ye Ashrafiyeh 44,941, Astara 51,579, Bandar-e Anzali 118,564, Barehsar 1,612, Bazar Jomeh 5,729, Chaboksar 8,224, Chaf and Chamkhaleh 8,840, Chubar 5,554, Deylaman 1,729, Fuman 35,841, Gurab Zarmikh 4,840, Hashtpar 54,178, Haviq, 4,261, Jirandeh 2,320, Kelachay 12,379, Khomam 20,897, Khoshk-e Bijar 7,245, Kiashahr 14,022, Kuchesfahan 10,026, Kumeleh 6,457, Lahijan 101,073, Langarud 79,445, Lasht-e Nesha 10,539, Lavandevil 11,235, Lisar 3,647, Lowshan 13,032, Luleman 7,426, Maklavan 1,635, Manjilabad 15,630, Marjaghal 6,735, Masal 17,901, Masuleh 393, Otaqvar 1,938, Pareh Sar 8,016, Rahimabad 10,571, Rankuh 2,154, Rasht 679,995, Rezvanshahr 19,519, Rostamabad 13,746, Rudbar 10,504, Rudboneh 3,441, Rudsar 37,998, Sangar 12,583, Shaft 8,184, Shalman 5,102, Siahkal 19,924, Sowme'eh Sara 47,083, Tutkabon 1,510, and Vajargah 4,537.
 Gilan has a humid subtropical climate with, by a large margin, the heaviest rainfall in Iran: reaching as high as 1,900 millimetres (75 in) in the southwestern coast and generally around 1,400 millimetres (55 in). Rasht, the capital of the province, is known internationally as the "City of Silver Rains" and in Iran as the "City of Rain".
 Rainfall is heaviest between September and December because the onshore winds from the Siberian High are strongest, but it occurs throughout the year though least abundantly from April to August. Humidity is very high because of the marshy character of the coastal plains and can reach 90 percent in summer for wet bulb temperatures of over 26 °C (79 °F). The Alborz range provides further diversity to the land in addition to the Caspian coasts.
 The coastline is cooler and attracts large numbers of domestic and international tourists. Large parts of the province are mountainous, green and forested. The coastal plain along the Caspian Sea is similar to that of Mazandaran and mainly used for rice paddies. Due to successive cultivation and selection of rice by farmers, several cultivars including Gerdeh, Hashemi, Hasani, and Gharib have been bred.
 Gilaks form the majority of the population, while Azerbaijanis, Kurds, Talysh and Persians are significant minorities in the province. Gilaks live in most of the cities and villages in the province, except Astara and Hashtpar counties.
 The city and county of Astara are inhabited by majority Azerbaijanis.
 There are four groups of Kurds in the province with different origins. Amarlou in Rasht and Rudbar (Districts of Ammarlu, Deylaman, and Raḥmatabad), Reshvand in Rasht, Jalalvand in Langroud, and Kormanj in Hashtpar. 
 In Talysh county (Hashtpar), the majority are Talysh, and Azerbaijanis make up a siginificant portion of the population. There are also Kurdish-speaking Gormanj in Talysh county who are immigrants from Khalkhal of Ardabil province.
 Persians are concentrated in the city of Rasht and are divided into immigrants from Tehran and other central Iranian cities, and the local Gilak people who have adopted the Persian language and became Persianized. 
 
The Gilaki language is a Caspian language, and a member of the northwestern Iranian language branch, spoken in Iran's Gilan, Mazandaran and Qazvin provinces. Gilaki is one of the main languages spoken in the province of Gilan and is divided into three dialects: Western Gilaki, Eastern Gilaki, and Galeshi (in the mountains of Gilan and Mazandaran). The western and eastern dialects are separated by the Sefid Roud. 
 Although Gilaki is the most widely spoken language in Gilan, the Talysh language is also spoken in the province. There are only two cities in Gilan where Talyshi is exclusively spoken: Masal and Masoleh (although other cities speak Talyshi alongside Gilaki) while Talyshi is spoken mostly in the city of Astara, Hashtpar and surrounding towns.
 The Kurdish language is used by Kurds who have moved to the Amarlu region.
 Persian is also spoken in the province of Gilan as it is Iran's official language, requiring everyone to know Persian.
 Heritage language data as of 2022: Mother tongue data as of 2022: