WASHINGTON — The House on Wednesday overwhelmingly voted to condemn the liberal advocacy group MoveOn.org for a recent advertisement attacking the top U.S. general in Iraq.

By a 341-79 vote, the House passed a resolution praising the patriotism of Gen. David Petraeus, the commander of U.S. forces in Iraq, and condemning a MoveOn.org ad that referred to Petraeus as “General Betray Us.”

The liberal group’s full-page ad appeared earlier this month in The New York Times and has served as a rallying point for Republicans. President Bush called the ad “disgusting” and criticized Democrats such as Sen. Hillary Clinton, the front-runner for the party’s nomination, for being afraid of irritating the group.

“Such unwarranted attacks should be strongly condemned by Republicans and Democrats alike,” said Rep. Jerry Lewis, R-Calif., during brief debate on the resolution.

Wisconsin Rep. David Obey, a veteran Democrat, recounted how he left the Republican Party during the era of Sen. Joseph McCarthy, R-Wis., and said that lawmakers have an obligation to criticize their allies as well as their enemies when they go too far.

“I’ve got an obligation to be equally upset when that kind of juvenile debate emanates from the left,” Obey said.

“With every passing day, more American soldiers and Iraqi civilians lose their lives in this unwinnable civil war,” said Eli Pariser, executive director of MoveOn.org Political Action. “It is unconscionable and outrageous that instead of doing the people’s work and ending this war, Congress chooses meaningless and distracting gestures.”