After its defeat in World War II , Japan recovered to become an economic power and an ally of the US .