From 1356 Oster was under control of the Grand Duchy of Lithuania, and from 1569, under the Union of Lublin, it was part of the Polish–Lithuanian Commonwealth. In 1648 it became part of an uyezd (county) of the Pereiaslav regiment. From 1654, Oster was under control of the Russian Empire. In 1622, King Jan II Casimir granted Oster the Magdeburg rights and a coat of arms. After harsh battles of the Ukrainian War for Independence, Polish rule was again established in Oster, but in February 1664, with support from the local population, the Poles were driven back by Cossacks and the Russians. In 1803, the city became an uyezd center of Chernigov Gubernia.