How the threat of terrorism shape foreign and domestic policy

How did the threat of terrorism shape foreign and domestic policy in the first decade of the 21st century?