The US House of Representatives on Wednesday rejected an amendment to the farm bill to promote the use of more locally grown food in poor countries over the controversial practice of shipping US-grown commodities.

The food aid reform act, introduced by Ed Royce, the House foreign affairs committee chairman, and Karen Bass, on the House Africa sub-committee, would have eliminated previous requirements that food aid be grown in the US and transported on US-flagged ships.

The US provides roughly half of food aid globally at an estimated annual cost of $2bn. But, unlike many other major donors, virtually all American food aid is "tied" and must be bought from US suppliers and transported on US ships – even if there are cheaper alternatives. Critics have complained for years that the programme is as much about corporate welfare for American companies as helping hungry people overseas.

A Guardian analysis of hundreds of food aid contracts awarded by the US department of agriculture (USDA) in 2010-11 showed that two-thirds of food for the billion-dollar aid programme in 2011 was bought from just three US-based multinationals – the highly profitable and politically powerful companies that dominate the global grain trade: ADM, Cargill and Bunge.

A study by agricultural economists at Cornell University (pdf) found that buying food locally leads to average cost savings of more than half for cereals like wheat, and almost 25% for pulses like peas and lentils. However, it found that some processed foods like vegetable oil are potentially cheaper to buy and ship from the US.

The study estimated that procuring food locally, or distributing cash or vouchers, results in an average time-saving of nearly 14 weeks. It suggested a more flexible approach to food aid programmes, with agencies allowed to choose between food aid shipped from the US, locally or regionally purchased supplies, vouchers and cash transfers – depending on the situation and specific objectives.

Supporters of the amendment said the future interest of US agriculture lies less in the provision of US food aid and more in allocating food aid as cash spent in local markets to stimulate local economies, which could become markets for US goods in the long term. President Obama's administration has argued that local purchases would mean faster delivery of aid at a lower cost.

Oxfam America expressed disappointment that supporters of the amendment could not "overcome the political inertia and the special interests that were lined up against us", but took comfort that there was a vote at all.

"Just getting a vote is an accomplishment," wrote Gawain Kripke, director of policy and research at Oxfam America, on a blog. "[In the] last farm bill debate in 2008, Rep Earl Blumenauer heroically tried to force a vote on food aid reform, but was quashed by an overbearing rules committee, which wouldn't permit him to offer the amendment. So, that's progress!"

Special interests include the US shipping industry. When Obama last year lowered the share of US food aid that must be transported on US ships from 75% to 50%, USA Maritime, a coalition of shipping companies and labour associations, was quick to protest. Some NGOs also favour the current system as some food aid is passed on to NGOs to sell, or "monetise", in local markets, as a way to generate cash for their education, health and other development programmes.

Five years ago, Care, one of the world's largest humanitarian aid organisations, rejected $45m worth of US food aid, saying monetisation does more harm than good. However, many other NGOs still sign up to monetisation schemes – they need the cash, and other sources of funding are few and far between.

Although the amendment was defeated, Kripke believes that enough of a head of steam has been built up to think that changes may be possible in the next few years. The vote was tantalisingly close: 203 for the amendment and 220 against.

"This issue has been around for years and it is not going away," he said.