Economic sanctions often fail to achieve their stated ends, and at times can even be counter-productive. The mechanisms that lead to these negative outcomes remain unclear in the literature on economic sanctions however. One prominent theory holds that sanctions lead to a rally-around-the-flag effect, which generates greater support for the targeted regime or policy than would otherwise arise, but testing this view at the individual level has not generally been possible due to data availability. This study takes advantage of an individual-level panel survey in Ukraine that covers the period during which a political dispute in 2005-2006 between Ukraine and the Russian Federation led to a cut in gas exports to Ukraine, and subsequently, dramatically increasing gas prices. The findings show that individuals directly affected by the gas supply issues were significantly more likely to change their views in a "pro-Western" direction following the dispute, and to support more liberal economic policies than individuals who were not directly affected. This effect was more pronounced for Ukrainian than Russian language speakers, suggesting that dimensions of both identity and economic harm can channel the impact of sanction policies on public opinion following the use of economic sanctions.