Both, but if I had to pick one, it'd be economy.
With a hyper-economy, you can exert real power and influence, even force, in the world without ever firing a shot.
And a powerful military simply cannot even exist without a strong economy, so the question is moot, in a sense. You MUST...