Two senior US officials have warned against "appeasement" in the wake of last week's train bombing in Spain, in which 201 commuters were killed.
Hastert has stepped into a mine field with little apparent concern
The attacks contributed to the surprise election victory of the socialists, who have promised to withdraw Spanish troops serving in Iraq.
The most senior Republican in the US Congress, Dennis Hastert, accused the Spanish people of appeasing terrorists.
The top US military officer warned that weakness was likely to invite attacks.
The BBC's Justin Webb in Washington says Mr Hastert has stepped into a diplomatic minefield not caring much where he treads.
Our correspondent adds that the leader of the Republicans in the House of Representatives - who is third in line to the presidency - has expressed publicly the view that many Republicans have held privately.
"Here's a country who stood against terrorism and had a huge terrorist act within their country and they chose to change their government and to, in a sense, appease terrorists," Mr Hastert said on Wednesday.
His views will not be backed by the White House, which is hoping for some continuing alliance with Spain, but they capture the mood of America, our correspondent says.
Even Democratic Party presidential candidate John Kerry - a strong critic of administration's policies on Iraq - has called on the new Spanish government not to pull its troops out.
The chairman of the Joint Chiefs of Staff, Gen Richard Myers,
also expressed concern on Wednesday.
He did not criticise the new Spanish government, saying every country had to make its own decision about how it supports the war on terror.
But he added that this was not a conflict where neutrality was an option.
"If you look back through history and you look at situations that require people... to stand up and lead and be counted against various threats, appeasement just hasn't worked," he said.
"Weakness is provocative," Gen Myers added.
Spanish police believe last Thursday's attacks on packed trains in Madrid were carried out by Moroccan militants linked to al-Qaeda.
Prime Minister-elect Jose Luis Rodriguez Zapatero has said his position on Iraq is unchanged despite an appeal from Mr Bush not to withdraw Spain's 1,300 troops there.
He insists he will do so unless the UN intervenes in Iraq.