After that, the entrance of Naokiyo NAGAI with 36,000 koku from Nagaoka domain, Yamashiro Province finally brought a settlement to the domain lord, afterward, Meiji Period came during the 13th Nagai clan's governance.
その後、山城国長岡藩(山城国)より永井直清が3万6,000石で入ってようやく藩主が定着し、以後、永井氏13代の支配で明治時代を迎えた。