Shehyni (Ukrainian: Шегині, Polish: Szeginie) is a village of Mostyska Raion in Lviv Oblast of western Ukraine. Located at the border with Poland, it is best known as the site of the Medyka-Shehyni (border checkpoint).
The village, situated 14 km east of the city of Przemyśl was first mentioned in 1515 in a royal charter under the name of Szechinie. For most of its existence the village belonged to the Land of Przemyśl, itself part of Ruthenian Voivodeship of the Kingdom of Poland and then (since 1772) Austrian Galicia.
From the very beginning the village belonged to the so-called key of estates including Medyka, Pozdziacz, Torki and Buców, centred on the manor in Medyka, all based on a local variant of Magdeburg law, dubbed Ruthenian law. Initially the peasants settled there were tasked with taking care of the royal stables in Medyka; with time their duty towards the owner of Medyka manor was modified to simple serfdom, with yearly rent paid in grain. The village had a voigt (a certain Konarski) as late as 1565, and was populated by no more than 7 families of peasants. By 1589 the village had 48 male inhabitants (eligible for levy) and two inns paying a yearly rent of 78 Polish guilders. Some time before that date a mill and a fish pond were constructed in the village.
In 1880 there were only a handful of houses along the road linking Przemyśl with Mościska (modern Mostyska), with time the village grew to 1036 inhabitants (including 825 Ruthenians, 237 Poles and 63 Jews).
- "Anno 1515 ad 1517". Metrica Regni Poloniae (in Latin). Lib. lit T. Cracow. 1515. p. 423.
[P]rivilegium locationis villae Szechinie, in terra Premisliensi, circa villam Medyca, intra limites scilicet incipiendo ab eadem ipsa villa usque ad altum montem et ab illo monte ad Krzywy Potok et Stypieniec
- Kazimierz Arłamowski (1931). Klucz medycki starostwa przemyskiego w XVI wieku (in Polish). Lwów. pp. 133–164.
- Filip Sulimierski; Bronisław Chlebowski; Władysław Walewski, eds. (1880–1902). "Szechynie". Geographical Dictionary of the Kingdom of Poland (in Polish). XI. Warsaw: Filip Sulimierski and Władysław Walewski. pp. 884–885.