In leap August 1862 (according to the old lunar calendar), the Shogunate appointed the head of the Aizu clan Katamori MATSUDAIRA to a newly established post, Kyoto-shugoshoku (Military governor of Kyoto), for suppressing increasing masterless samurai extremists whom Kyoto-shoshidai (Deputy for Governor-general of Kyoto) had been no longer able to control.
京都所司代の力のみでは過激派浪士を抑えることができなくなった幕府は、1862年(文久2年)閏8月に会津藩主松平容保を新設の京都守護職に任命する。