Answer:
The samurai and daimyo gave back the power to the emperor and worked to reform Japan.
Explanation:
Japan had remained strongly isolated from the rest of the world for hundreds of years. Japan especially never trusted Western powers since they had better technology and were very aggressive and powerful. In 1853, American Commodore Matthew C. Perry, arrived with four US military, steam-powered ships which were equipped with very modern and destructive guns. The Japanese had no means to oppose him in any manner and yielded to his demands, that Japan signed an official treaty of trade and commerce with the United States of America. This treaty, the Convention of Kanagawa angered many of the highest-ranking samurais for whom it was seen as a capitulation. They decided that Japan was way behind Western powers and that unless they imposed radical societal, economic reforms, they would be governed by the West. They managed to remove Tokugawa Yoshinobu, the last Shogun of Japan and restored the Emperor.
Traditionalist samurais were lincensed by this act and a civil war ensued, which reformist samurais were able to win with the help of Western technology and military advisors. Most power was transferred to the Emperor and Japan started massively importing technology and methods of social organization from many different countries in the west.