In 1668, Chikashige MAKINO of Kyoto Shoshidai decided to step down, and upon his departure, Kyoto Magistrate was founded by absorbing the civil administration division that had been managed by the Shoshidai, with Miyazaki becoming the first Higashimachi Magistrate and Amemiya becoming the first Nishimachi Magistrate.
更に寛文8年（1668年）に入ると、京都所司代牧野親成の退任も決まり、これを機に所司代が担当していた京都市中に対する民政部門を統合して京都奉行が成立し、宮崎は初代東町奉行・雨宮は初代西町奉行となった。