In the past entering and leaving Thailand was done freely. During the seventh reign of the Bangkok dynasty, King Rama VII Prachathipok issued the royal immigration act 2470 (1927) and created the Immigration Department within the Ministry of the Interior and put it in charge of controlling the arrivals to and departures from Thailand, in order to be in line with other civilised nations. The first head of the Immigration department was Pol. Col. Wichai Prachabal who had a mere 50 officers in his department. In 1932 the Immigration Department was attached to the Police Department and its name changed into Immigration Division.