The Meiji Government, determined to build a modern state, invited many foreigners called "hired foreigners" to Japan to adopt the Western system and technology. The number of such foreigners is said to have amounted to 300 at the Industry Ministry alone. They constructed the railroad and lighthouses, operated locomotives and trained Japanese engineers. One of these foreigners was an English engineer by the name of Gilbert. At that time, Japan had just been opened and anti-foreigner sentiment was strong. It is said that he was protected by his bodyguard.