Thus it was decided that the bakufu should control the whole areas of ju-ri square of Edo and Osaka by issuing an order to make daimyo and hatamoto return their territories to the bakufu which were within the said ju-ri areas and to supply them with substitute lands near their honryo (main domain), and as a result, Agechi-rei was issued on June 1 (in the old calendar), 1843.
そこで大名、旗本には十里四方に該当する領地を幕府に返上させ、かわりに、大名・旗本の本領の付近で替え地を幕府から支給するという命令を出し、江戸・大坂十里四方を幕府が一元的に管理する方針を固め1843年（天保14年）6月1日(旧暦)、上知令が発布された。