Senate Republicans narrowly passed a $4 trillion budget plan Thursday, taking their first big step toward a tax reform package promised by President Donald Trump.

Approval of the nonbinding plan allows the Senate to use a special process known as "budget reconciliation" that would forestall a Democratic filibuster.

"Tonight we completed the first step towards replacing our broken tax code by passing a comprehensive, fiscally responsible budget that will help put the federal government on a path to balance," said Senate Majority Leader Mitch McConnell, R-Ky. "We have a once-in-a-generation opportunity to replace a failing tax code that holds Americans back with one that works for them."

The Senate plan, approved on a 51-49 vote, calls for $473 billion in cuts from Medicare over 10 years and more than $1 trillion from Medicaid.

If fully implemented, the plan would cut spending by more than $5 trillion over the next 10 years, with an average of approximately $540 billion per year over the life of the plan, according to a Congressional Budget Office estimate.

Sen. Rand Paul, R-Ky., was the only Republican to vote against the bill, joining all 46 Democrats and two independents.

"We can’t spend our way to prosperity," Paul said in a statement. "I will fight for the biggest, boldest tax cut we can pass, but I could not in good conscience vote for a budget that ignores spending caps that have been the law of the land for years and simply pretend it didn’t matter."

Sen. Thad Cochran, R-Miss., returned to Washington after receiving treatment for urological problems to vote for the measure. Other Republican moderates -- including Sens. John McCain of Arizona, Bob Corker of Tennessee, and Susan Collins of Maine -- backed the effort.

Tax reform, always a top item on the GOP agenda, has taken on even greater urgency with the failure of the party to carry out its longstanding promise to dismantle former President Barack Obama's signature health care law. Republicans have said failure on taxes would be politically devastating in next year's midterm elections when control of the House and Senate are at stake.

The House passed its version of the budget plan last week. It calls for tax cuts that don't add to the deficit and would pair the tax rewrite measure with $200 billion in spending cuts over the coming decade. Both plans include a provision to permit oil and gas exploration in Alaska's Arctic National Wildlife Refuge.

Senate Minority Leader Chuck Schumer, D-N.Y., blasted the GOP framework as "nasty and backwards."

"It shifts the burden from the wealthy and puts it squarely on the back of the middle class, and blows a hole in the deficit to boot," Schumer said in a statement. "I think it will go down in history as one of the worst budgets Congress has ever passed."

Fox News' Chad Pergram and the Associated Press contributed to this report.