WASHINGTON (Reuters) - U.S. Senate Republicans appeared to have enough votes on Wednesday to pass a budget measure that is crucial to President Donald Trump’s hopes of enacting tax reform legislation before the end of the year.

U.S. President Donald Trump speaks about tax reform in Harrisburg, Pennsylvania, U.S., October 11, 2017. REUTERS/Joshua Roberts

Senate Republican whip John Cornyn, who is in charge of marshalling votes for legislation, said he expected the fiscal 2018 spending blueprint to draw the support necessary to unlock a legislative tool enabling Republicans to move a tax reform bill through the Senate without help from Democrats.

Asked if Republicans had enough votes to pass the budget measure, Cornyn told Reuters: “I believe we do.” The resolution requires approval from at least 50 lawmakers in the 100-seat chamber, with Vice President Mike Pence able to cast a tie-breaking vote.

The Senate is expected to vote on the budget resolution on Thursday.

Republicans control the Senate by only a 52-48 margin, and with Democrats largely opposed to Trump’s plan to deliver up to $6 trillion in tax cuts to businesses and individuals, Republicans can afford to lose few votes among their own.

A budget approved by the Senate and the House of Representatives would allow Republicans to use a procedure known as reconciliation to move tax legislation through the Senate with a simple majority, rather than the 60 votes normally required.

Republican Senator Rand Paul, a fiscal hawk, has threatened to vote against the measure. But Republicans would need to lose three votes for the measure to fail, and there did not appear to be two other Republicans opposing the resolution.

On Wednesday, Republicans voted down Democratic amendments to prevent tax cuts for wealthy Americans and protect funding for the Medicare and Medicaid health insurance programs for the elderly and the poor.

Earlier on Wednesday, Trump talked with 18 members of the tax-writing Senate Finance Committee, including Republicans and five Democrats who are up for re-election in states that Trump won in the 2016 presidential election. The White House hopes those Democrats will be open to working with Trump.

It was the latest White House attempt to recruit Democratic support to ensure that tax reform does not meet the same fate as Republican efforts to repeal Obamacare, which failed in the Senate when Republicans could not muster enough votes.

Trump and top Republicans insist that the tax plan would benefit the middle class.

Analysts argue that wealthy Americans would benefit most. On Wednesday, the left-leaning Center for American Progress released a report saying that Trump personally would get $23 million a year from a proposed business tax cut, while his heirs and heirs of his Cabinet members would reap $3.5 billion from the repeal of the federal inheritance tax.

Senator Ron Wyden, the committee’s top-ranking Democrat, who attended Wednesday’s meeting, said he warned Trump that some middle-class voters would be hurt by the plan’s proposal to eliminate the $4,000 personal exemption and the deduction for state and local taxes.

“Any plan that starts off with the middle class in a serious hole is going to be pretty hard to fix,” Wyden told reporters.

Democrats oppose the Republican budget resolution in part because it would allow tax legislation to expand the federal deficit by up to $1.5 trillion over the next decade.