SEATTLE — When Texas officials pushed Amazon to pay nearly $270 million in back sales taxes in 2010, Amazon responded by closing its only warehouse in the state and scrapping expansion plans there. Two years later, the officials agreed to waive the past taxes in exchange for Amazon opening new warehouses.

A similar scene played out in South Carolina, where officials decided in 2011 to deny Amazon a sales tax break. After threatening to stop hiring in the state, the company got the tax exemption by promising to hire more people.

And last year in Seattle, the company’s hometown, Amazon halted plans to build one tower and threatened to lease out one under construction when local officials pushed a tax on large employers. The City Council passed a smaller version of the tax, but the company helped finance a successful opposition to repeal it. Now, Amazon plans to lease out its space in the tower under construction anyway.

In New York, Mayor Bill de Blasio called it a “shock to the system” when Amazon, facing criticism for the deal it reached to build a headquarters in the city, abruptly dropped the plans. Gov. Andrew M. Cuomo is still trying to woo them back. But the reversal mirrored the company’s interactions with officials in other states.