On June 27, 1871, the Meiji government officially adopted the "yen" as Japan's modern unit of currency under the New Currency Act of 1871. While initially defined at par with the Spanish and Mexican dollars then circulating in the 19th century at 0.78 troy ounce (24.26 g) of fine silver, the yen was also defined as 1.5 grams of fine gold, considering recommendations to put the currency on the bimetallic standard. The Act also stipulated the adoption of the decimal accounting system of yen, sen, and rin, with the coins being round and manufactured using Western machinery acquired from Hong Kong. The new currency was gradually introduced beginning from July of that year.
The yen replaced the complex monetary system of the Edo period in the form of Tokugawa coinage as well as the various hansatsu paper currencies issued by Japan's feudal fiefs in an array of incompatible denominations. The former han (fiefs) became prefectures and their mints private chartered banks, which initially retained the right to print money. To bring an end to this situation, the Bank of Japan was founded in 1882 and given a monopoly on controlling the money supply.