Nationalism is often considered as a destructive force that interferes with international concessions and promotes conflicts. However, existing literature is ambiguous about how exactly nationalism affects a state’s foreign policy. It largely neglects the central role of the state in controlling nationalism. To examine the independent effect of nationalism, this dissertation starts from the condition when there exists a discrepancy in foreign policy preference between the state and the nation. That is, when nationalism drives the domestic population to embrace assertiveness and violence against a foreign enemy, the state leader prefers conciliation and conflict de-escalation. Within the scope condition, the dissertation asks when nationalism pushes the state into unwanted conflict with another state and conversely when the state is able to successfully manage nationalism so as to fulfill its preference of conciliation. I present a two-step argument to explain the variation in state’s success or failure in nationalism management. The main argument is that whether the state is able to manage nationalism and make concessions depends on whether it obtains assistance from the pivot supporter—the media or the military. The second level of argument concerns when it is the media or the military that plays the pivot role. I argue that the pivot-ness of the media or the military is a function of the means—voting or popular resistance—the nationalist opposition stages to challenge the state foreign policy, which is largely conditioned by a state’s regime type. Utilizing a medium-N cross-national study of 47 cases, I find a consistent pattern that it is the side the pivot supporter takes—which I call domestic alliance structure—that determines the success or failure of nationalism management. I then rely on comparative studies of two sets of cases to test the causal mechanism. The first set is selected among democracies, namely Britain during the 1853-4 Crimean Crisis and Britain during the pre-WWII Crisis; the second consists of cases of autocracies, namely China during the 1931-2 Manchuria Crisis and China during the 1935-7 North China Crisis against Japan. The comparative case studies further demonstrate that it is the alliance structure that determines the success or failure in the state’s nationalism management, rather than other widely acknowledged factors such as regime type, international context, or resistance capacity.