The US Senate has voted to soften a controversial "Buy American" clause in an economic recovery package, after warnings it might spark a "trade war".
The clause had sought to ensure only US iron, steel and manufactured goods were used in projects funded by the bill.
But senators approved an amendment requiring that provisions in the bill comply with international trade agreements with Canada and the EU.
Earlier President Barack Obama said the US should avoid seeming protectionist.
The BBC's Jonathan Beale in Washington says the climb-down by the US Senate follows warnings from the EU and Canada that the stimulus bill could spark a trade war.
The White House has said it supports giving preference to domestic manufacturers in public works programmes - but only if it does not violate existing trade agreements, our correspondent says.
There will be a sigh of relief from many people at the Senate's move, he adds, but it remains to be seen whether the House of Representatives will back the watered-down version of the bill.
US senators voted overwhelmingly late on Wednesday to require the "Buy American" provisions "be applied in a manner consistent with US obligations under international agreements".
However, an amendment put forward by Republican Senator John McCain which would have removed the clause altogether was defeated.
Speaking before a vote on that amendment, Mr McCain warned that if the provisions were passed it would "only be a matter of time before we face an array of similar protectionism from other countries - from 'Buy European' to 'Buy Japanese' and more".
European and Canadian ambassadors to Washington had already warned that the clause could provoke protectionism and trigger retaliatory moves.
The EU had said the clause in the $800bn (£567bn) US economic recovery package would send "the worst possible signal".
A European Commission spokesman said the EU would launch a complaint with the World Trade Organization (WTO) if the clause remained.
Canada's ambassador to the US, Michael Wilson, had also urged the US Congress to drop the provision.
The economic rescue plan has been approved by the US House of Representatives and is under discussion this week in the Senate, which could sign it off before the weekend.
In TV interviews on Tuesday, Mr Obama said he did not want to include measures that would signal protectionism at a time of declining world trade.
"I think we need to make sure that any provisions that are in there are not going to trigger a trade war," he told TV network ABC.
In another interview with Fox News, he said: "I think it would be a mistake though, at a time when worldwide trade is declining, for us to start sending a message that somehow we're just looking after ourselves and not concerned with world trade."
In addition to the opposition from the EU and Canada, some senior US Republicans had cautioned that the Buy American measure could start trade wars.
Mr Obama has urged the US Congress not to delay his stimulus plan over modest differences.
It is unlikely that the package will be able to pass the Senate without Republican support.