I suppose you have heard about religions and faiths. I'd hazard to say that about 1000 years of European history was shaped primarily by them. Major wars fought, new countries founded, major discoveries and inventions made or unmade and prohibited, people's daily lives shaped and defined.
A similar thing has been occurring to Arabic world and neighboring peoples for about 1500 years, and is actively continuing now.
Looking at the current situation in the US is also illustrative.
I would say that ideas greatly prevail over material conditions once immediate survival is secured.