Sarim
The Sarim (sometimes Saarim), or "forest of scholars," was a powerful faction of literati that dominated Middle and Late Joseon politics in Korea.

History of Sarim faction

Early beginning
The philosophical lineage of the Sarim scholars originated from the neo-Confucian school of Gil Jae (1353–1419), a Goryeo scholar who studied under Yi Saek and Jeong Mong-ju. After the fall of the Goryeo dynasty, he retreated to his home village refusing to serve the new Joseon dynasty despite King Taejong's request. Gil Jae concentrated on cultivating a new generation of neo-Confucian scholars including Kim Suk-ja and his son Kim Jong-jik. 

When King Seongjong became the ninth king of Joseon, he invited Kim Jong-jik and his disciples, who came to be called Sarim scholars, to his court and supported their political growth. They primarily served in so-called Three Offices, from which challenged the entrenched "Hungu" officials, who accumulated great power and wealth by supporting King Sejo when he usurped the throne from his nephew.

Struggle with Hungu faction

In their conflict with the established Hungu faction, Sarim faction suffered a series of bloody purges during the reigns of Yeonsangun, Jungjong, and Myeongjong. They enjoyed a brief period of power during Jungjong's reign through Kim Gueng-pil's disciple Jo Gwang-jo, who pursued radical reforms to transform Joseon into an idealistic neo-Confucian society. 

However, the Sarim faction, whose origin stems from denial of the legitimacy of Joseon dynasty, was vulnerable to Hungu's attacks because it questioned the legitimacy of King Sejo's usurpation and primarily engaged in the censorate role against the king and ministers.  After four major purges that saw Jo Gwang-jo and many others executed, the Sarim scholars again retreated to rural villages where they continued to spread their philosophy through local schools called seowon and maintained their power base through the system of Hyang'yak.

While Hungu faction declined over the years without ideological successor to replace it, the Sarim faction maintained its identity through "martydom" of the earlier generation and came to dominate the court politics during the reign Seonjo. By then, Sarim philosophy coalesced around the teachings of the philosophers Yi Hwang and Yi I. Since then, the Sarim faction maintained political power for much of the Joseon dynasty.

Factional struggle
After the Sarim faction replaced the Hungu faction as the predominant political force in the late 16th century, a nationwide split occurred between the Eastern faction (Dong-in) and Western faction (Seo-in). Political divisions intensified even further as the Eastern faction in turn split between the hard-line Northern faction (Buk-in) and the moderate Southern faction (Nam-in) and the Western factions split between the Old Doctrine(Noron) and the Young Doctrine(Soron).

These factional splits grew out of allegiance to different philosophical schools and regional differences. For instance, the Eastern faction was largely Yeongnam-based, and its subfaction Southerners were mainly followers of Yi Hwang while Northerners coalesced around the school of Jo Shik. Gyeonggi and the Chungcheong-based Western faction were largely followers of Yi I, of which followers of Seong Hon split to form the Soron faction while Song Siyeol's followers became the Noron faction. These divisions were often further driven by questions concerning royal succession or appropriate royal conduct. The factions were often named after relative location of its leader's house.

Easterners vs Westerners

In the initial split of Sarim into the Western and Eastern factions, there was a large element of generational conflict. The Westerners were largely older Sarim scholars who entered politics during Myeongjong's reign while the Easterners, led by Kim Hyo-won (김효원) were mainly younger generation who became officials in Seonjo's reign and saw themselves uncorrupted by excesses of Myeongjong's era, which was marred by his maternal uncle Yoon Won-hyeong's corruption.

The Westerners were led by Shim Eui-gyeom (심의겸), Myeongjong's brother-in-law whose house was on the west of the palace. Although Sarim scholars were usually hostile to royal in-laws as corrupting influence, Shim was Yi Hwang's disciple and protected Sarim scholars by impeaching his uncle who was planning another literati purge. In addition, many Westerners were disciples of Yi I and Seong Hon and followers of Giho school while many Easterners were disciples of Yi Hwang and Jo Shik and followers of Youngnam School. Easterners emphasized moral purification of the ruling class and rooting out corruption of earlier period while Westerners emphasized reforms that would strengthen the country and improve livelihood. (Easterners blamed Shim Eui-gyeom's ill-willed opposition to Kim Hyo-won's appointment at a key position in Ministry of Personnel for split while Westerners blamed Easterner's self-righteous attack.) Yi I attempted to prevent the factional split by appointing Shim Eui-gyeom and Kim Hyo-won to provincial posts far away from the court and arranging truce between Easterner Yi Bal and Westerner Jeong Cheol. After Yi I's death, however, the conflict between two factions became more intense as the Easterners impeached Shim Eui-gyeom and Jeong Cheol, leading to their dismissal, and gained upper hand. 

In 1589, Easterner Jeong Yeo-rip was accused of treason because he formed a society with his supporters that met each month to study and receive military training. History of the Sarim after its split is very complicated because there is a wealth of conflicting historical accounts written by each faction. This is especially true with what became known as Gichuk Treason Case of 1589 (기축옥사), the bloodiest purge in Joseon history by far. There is still a dispute about the nature and purpose of Jeong Yeo-rip's group of armed supporters and whether it was treason or frame up. His group was not a secret society as it helped the local government to help fight against the Japanese marauders. On the other hand, it appears that Jeong truly had revolutionary ideas that was close to republicanism. He believed that the world was something to be shared and therefore there could not be one master. His group, called "Great Common Society"(대동계), could be joined by anyone regardless of one's social status, and it spread throughout Honam province and to other regions as well. In any case, Jeong Yeo-rip committed suicide after his arrest was ordered, which was considered the admission of guilt, and letters of Easterners were discovered from his house.

Jeong Cheol, famous poet and head of the Western faction, was in charge of investigating the case and used the case to effect widespread purge of Easterners who had slightest connection with Jeong Yeo-rip. According to Easterners' accounts, Jeong Cheol tortured even 80-year-old mother and 8-year-old son of Yi Bal, leader of Eastern faction. According to Westerners' accounts, Jeong Cheol tried heroically to save Yi Bal and Choe Yeong-gyeong from Seonjo's wrath. In any event, 1,000 Easterners were killed or exiled in the aftermath. It is also believed that Seonjo used this incident to weaken the Sarim's power.

Northerners vs. Southerners
This incident put the Westerners in power, but did not last long because of intrigue involving the appointment of the crown prince, which put the Easterners back in power for thirty years. The Eastern faction soon split into hardline Northern faction (Buk-in), which wanted to put Jeong Cheol and other Westerners to death, and moderate Southern faction (Nam-in), which did not want a wholesale purge. The Northerners were largely disciples of Jo Shik and Seo Gyeong-deok and suffered more from Jeong Yeo-rip's "rebellion" while the Southerners were largely Yi Hwang's disciples and less affected.

The Southerners, led by Yu Seong-ryong, were initially in power after Japanese Invasion in 1592, and maintained the policy of coexistence with Northerners and Westerners until its effort to reach peace agreement with Japan failed. The Northerners, now in power, split again over the proper successor to Seonjo, who had no legitimate son. Greater Northern faction supported Gwanghaegun while Lesser Northern faction supported another prince. During Gwanghaegun's reign, Greater Northern faction split further and persecuted other factions until Southerners and Westerners joined their forces in a coup d'état that deposed Gwanghaegun and placed Injo on the throne.

With the Westerners back in power, Joseon politics entered more stable stage in which they competed with Southerners in relatively peaceful coexistence for about 100 years. But under Hyojong's reign, the Western faction was becoming more powerful.

Sukjong's reign
In the early years of Sukjong's reign, the Southern faction and Western faction clashed over Royal Funeral Dispute, a seemingly minor issue regarding mourning period for Queen Insun. The Southern faction claimed that mourning period should last one year while Western faction argued for a nine-month mourning period. A one-year mourning period meant that Hyojong was considered the eldest son while 9-month period would suggest that Hyojong was considered not the eldest son, following the rules that governed the yangban class. In other words, Western faction viewed the royal family as the first of yangban class rather than a separate class for which different rules applied. The two factions were also in conflict over issue of fighting Qing Dynasty, which was considered barbarian country (as opposed to Ming Dynasty) that threatened Joseon's national security. Southern faction, led by Huh Jeok and Yoon Hyu, supported war against Qing while Western faction wanted to focus first on improving domestic conditions. Under Sukjong's reign the factional fight became more intense and deadly since Sukjong frequently replaced faction in power with another one to strengthen the royal authority. With each change of government, which was called hwanguk (환국 換局), literally turn of the state, the losing faction was completely driven out of politics with executions and exiles.

Westerners vs. Southerners
Sukjong at first sided with the Southern faction, but in 1680, Huh Jeok was accused of treason by Western faction, which led to execution of Huh Jeok and Yoon Hyu and purge of Southern faction. This incident is called Kyungshin hwanguk (경신환국). Now in power, Western faction split into Noron (Old Doctrine) faction, led by Song Siyeol, and Soron (New Doctrine) faction, led by Yoon Jeung. After nine years in power, Noron collapsed when Sukjong deposed Queen Inhyeon, who was supported by Western faction, and named Consort Hee of Jang clan (or Consort Jang) as the new queen. Western faction angered Sukjong when it opposed the naming of Consort Jang's son as crown prince. Southern faction, who supported Consort Jang and her son, regained power and drove out Western faction, executing Song Siyeol in revenge. This is called Gisa hwangguk (기사환국).

Five years later in 1694, Southern faction was planning another purge of Western faction, accusing them of conspiracy to reinstate deposed Queen Inhyeon, when Sukjong began to regret deposing Queen Inhyeon and favor Consort Suk of Choi clan (Consort Choi), an ally of Queen Inhyeon and Noron faction. Angry with Southern faction's attempt to purge Westerners, Sukjong abruptly turned around to purge Southerners and brought the Western faction back in power. The Southern faction would never recover from this blow, also called Gapsul hwanguk (갑술환국). Sukjong demoted Queen Jang to Consort Jang and reinstated Queen Inhyeon. Consort Jang was eventually executed (with poison) for cursing Queen Inhyeon after the latter died. Soron faction supported the crown prince, Consort Jang's son, while Noron faction supported Consort Choi's son, Yeonying-gun (later to become Yeongjo). Late Queen Inhyeon and newly installed Queen Inwon were childless.

Soron vs. Noron
In 1718, Sukjong let the crown prince, soon to be Gyeongjong, rule the country as a regent. He died in 1720 supposedly after telling Yi Yi-myoung to name Yeonying-gun as Kyungjong's heir, but in absence of historiographer or recorder. This will would lead to yet another purge which led to execution of four Noron leaders in 1721, followed by another purge with executions of eight Noron people in 1722.

Under the reigns of Yeongjo and Jeongjo in the 18th century, the kings pursued a strict policy of equality, favoring no faction over another. However, in Jeongjo's reign, strife re-emerged as the ruling Noron faction split further between the Byeokpa and Sipa, two groups which cut across the earlier factions and differed in their attitudes concerning Yeongjo's murder of his son, who was also Jeongjo's father.

Decline
The division and subsequent conflict of these factions generally revolved around minor issues and reflected dogmatic and rigid nature of their philosophical interpretations. Sarim philosophy, which was progressive in Jo Gwang-jo's time, became very conservative and fundamentalist over time. The power struggle between these factions were marked by bloody purges with each change of power and resulted in a vicious cycle of revenge. The minor issues that divided these factions distracted the officials from real problems that affected the populace. Nevertheless, factional conflicts had some positive side as well. Compared to the late Jungjong and Myeonjong periods, corruption was limited since any faction engaged in excessive corruption would become an easy target for impeachment by its rival faction. Sukjong's reign, which saw some of the most intense factional struggles since Seonjo and Gwanghaegun's time, was one of more prosperous periods for the populace.

In the 19th century, Joseon politics shifted as in-law families rather than scholarly factions came to dominate the throne. For most of the 19th century, the Jangdong branch of the Andong Kim clan was in control of the government, which led to rampant corruption throughout the country.

Factions

Philosophical lineage
Yi Saek --> Jeong Mong-ju --> Gil Jae --> Kim Suk-ja --> Kim Jong-jik (Yeongnam Sarim) --> Kim Gueng-pil --> Jo Gwang-jo (Giho Sarim, Gimyo Sarim)
Yeongnam School
Yi Eon-jeok --> Yi Hwang
Yi Hwang --> Yu Seong-ryong, Kim Seong-il
Jo Shik --> Choe Young-gyeong, Jeong In-hong, Gwak Jaeu
Giho School
Seo Gyeong-deok --> Yi I, Heo Gyun, Hwang Jin-i
Yi I -> Kim Jang-seng --> Kim Jip --> Song Siyeol
Seong Soo-chim --> Seong Hon

Division
Sarim --> 
Eastern (Yeongnam School) -->
Southern (Yi Hwang)
Northern (Jo Shik, Seo Gyeong-deok) -->
Greater Northern
Lesser Northern
Western (Giho School) -->
Noron (Yi I)
Soron (Seong Hon)

Political leaders
Eastern: Kim Hyo-won (his house was on eastern side)
Northern: Yi Bal (his house was below northern Bukak Mountain), Yi San-hae, Jeong In-hong
Greater Northern: Yi San-hae, Hong Yeo-sun, Heo Gyun
Lesser Northern: Nam Yi-gong, Kim Seon-guk
Southern: Woo Seong-jeon (his house was below South Mountain), Yu Seong-ryong -->
 Heo Mok, Yoon Hyu -->
 Jeong Yak-yong
Western: Shim Eui-gyeum (his house was on western side), Jeong Cheol-->
Yi Haang-bok, Choe Myeong-gil -->
Noron: Song Siyeol
Soron: Han Tae-dong, Yoon Jeung