Twelve Republican senators on Thursday joined Democrats to vote against American President Donald Trump’s declaration of a national emergency. The vote for the resolution to end the border emergency passed in the U.S. House of Representatives last month. The 59-41 Senate vote, however, is short of the two-thirds majority that will be needed to overturn Trump’s veto. Minutes after the Senate vote, Trump wrote on Twitter, “VETO!” The 1976 National Emergencies Act gives presidents special powers to declare an emergency during a crisis. Congress can end a state of emergency with a joint resolution. If the president vetoes the resolution, Congress would need two-thirds of lawmakers to vote to end the declaration. Thursday’s vote marked the first time that Congress has rejected a presidential emergency under the act. The vote was also one of the few times that the Republican-controlled Senate has voted against Trump’s position.