The chamber comfortably passed the measure in a 59-41 vote. Twelve Republicans who worried about executive overreach supported it in an embarrassing blow to the president.
Trump plans to reject the bill, which the Democratic-held House has already passed. In one tweet after the vote, he simply said, "VETO!" In a subsequent message, he said he looks "forward to VETOING the just passed Democrat inspired Resolution," thanking Republicans "who voted to support Border Security and our desperately needed WALL!"
The veto would be the first of his presidency. Neither chamber appears to have enough support to overcome Trump's opposition with a two-thirds majority vote.
It is unclear now if House leaders will push for a vote to override the president's veto. Rep. Joaquin Castro, a Texas Democrat who introduced the House resolution, told reporters Thursday that he will push for another vote even though it will be "very tough" to reach a veto-proof majority. He called it a "consequential constitutional vote."