Do as I say, don’t do as I do. This is the message the Obama Administration and Congress are sending to fellow democracy India. While correctly pressing India to liberalize trade and investment, President Obama continues to hector India on outsourcing, and Congress has now transformed the talk into ugly action.

Last week, the President continued his portrayal of India as trying to take American jobs. A few days later, the Senate passed legislation requiring companies that hire a large number of high-skilled foreign workers to pay thousands more in fees for each one. This was intended to target certain Indian companies by constraining American access to them. Never mind that access to global markets makes America more competitive and ultimately creates more jobs and more wealth. This President and Congress are going with a simplistic—even patronizing—zero-sum argument that it’s either them or us.

And as usual, when they have nothing to offer on an issue, they turn to blame someone else.

To be sure, India’s own trade and investment policies are far from ideal and the U.S. has plenty of legitimate criticisms to level at New Delhi. But India is a consumer-oriented economy running a large trade deficit, not an export predator. There are strong reasons, in addition to the commercial ones, to engage more fully and equally with India, not punish it. Not only is it a democracy but also the U.S. and India have emerging and important strategic interests.

The President wants to double exports to help our economy. In advocating restrictions on carbon emissions that will hurt our economy, the Obama Administration argues the world will not act unless America leads. In trade, though, the President and Congress set no example for the world to follow—quite the opposite in fact. The Administration resorts more and more to punitive trade and investment actions like trade duties and disincentives to invest, such as the visa fees directed at India.

India is a rapidly growing economy driven by its consumers. It is an American friend. Picking on India, especially, tells the world that the U.S. commitment to open trade and investment is weakening, a message that will end up hurting both our foreign policy and our economy.