It has also described the move as an unconstitutional attempt to restrict presidential power.
The vote, which passed 215-208, was to adopt the war powers resolution, which would require Trump to withdraw US forces or seek congressional approval for the conflict.
The measure considered was a concurrent resolution. If it is also passed by the Republican-controlled US Senate, it would not require the president’s signature, though it could be subject to a legal challenge.
Trump’s post on Thursday morning went on to say: “The Democrats are fueled by Trump Derangement Syndrome. They would rather have our Country fail than give me another, of many, victories.
“The four Republicans, that’s a whole other story – They’re GRANDSTANDERS! They should be ashamed of themselves.”
This was the fourth attempt by the House to rein in Trump’s war powers. The Senate advanced a similar resolution in May but has yet to hold a full floor vote.
Despite being seen as largely symbolic, the passage of Wednesday’s resolution adds to the pressure on the White House to find an end to the war, as petrol prices have spiked and public opposition to the war has increased.
The vote also marked the latest sign of division within Trump’s Republican Party, coming just days after a revolt by conservatives in Congress led his administration to pull back plans for a $1.8b “anti-weaponization” fund for political allies.
The four Republicans who attracted Trump’s ire were Thomas Massie, Brian Fitzpatrick, Tom Barrett, and Warren Davidson, who joined a united front of Democrats. Democrat Jared Golden of Maine, who had previously voted against similar measures, gave his support this time.
“Congress alone declares war, that’s something certainly we need to be protective of,” Barrett, a Republican from Michigan, said. Asked if he was worried about retribution from Trump for his vote, he said: “I vote my conscience for what I think is right and willing to accept that.”