Sessha (摂社, auxiliary shrine) and massha (末社, undershrine), also called eda-miya (枝宮, branch shrines) (collectively known as setsumatsusha (摂末社)[note 1]) are small or miniature shrines entrusted to the care of a larger shrine, generally due to some deep connection with the enshrined kami.
The two terms used to have legally different meanings, but are today synonyms. Setsumatsusha can lie either inside (境内摂末社, keidai setsumatsusha) or outside (境外摂末社, keigai setsumassha) the main shrine's premises. Setsumatsusha are usually 1x1 ken in size. They can however be as small as beehives or relatively large and have 1x2, 1x3 or even, in one case, 1x7 bays.
The practice of building sessha and massha shrines within a jinja predates written history. The earliest setsumatsusha usually had some strong connection to the history of the area or the family of the enshrined kami.
During the Heian period, Ise Shrine used to make a distinction between the two types based on whether a shrine belonged to the Engishiki Jinmyōchō list (sessha) or to the Enryaku gishikichō list (massha).
From the Japanese Middle Ages onwards, at other shrines popular kami like Hachiman, Inari or Gozu Tennō (牛頭天王) were often enshrined[note 2] in setsumatsusha, but no clear distinction between the two terms was made. From the Meiji period to the Second World War, a shrine dedicated to family members of a kami, to the violent side of a kami (荒魂, aramitama), or the kami of the region where the main shrine was, were to be considered sessha with a higher rank than the rest, which were called massha. When the shakaku (社格) shrine ranking system was abolished in 1946, legally the distinction disappeared, but both terms remained in use out of habit.
Being true shrines, setsumatsusha have most features other types of shrines have, including doors and often stairs. However, the Misedana-zukuri (見世棚造 or 店棚造, showcase style) is a style normally used only in sessha and massha. It owes its name to the fact that, unlike other shrine styles, it doesn't feature a stairway at its entrance, and the veranda is completely flat. Miniature stairways can however be present. They can be either tsumairi (妻入), that is have the entrance under the gable, or, more frequently, hirairi (平入), that is, have the entrance on the side parallel to the roof's ridge (see examples in the gallery). Apart from the lack of a staircase, such shrines belong to the nagare-zukuri or kasuga-zukuri styles.