WASHINGTON — Republicans took a critical step toward notching their first significant legislative victory since assuming full political control, as the House and Senate voted along party lines on Tuesday and into early Wednesday to pass the most sweeping rewrite of the tax code in decades.

The $1.5 trillion tax bill, which is expected to head to President Trump’s desk in the coming days, will have broad effects on the economy, making deep and lasting cuts to corporate taxes as well as temporarily lowering individual taxes.

The endeavor was not without hiccups, however, as three small provisions in the final tax bill agreed to by the House and Senate were found by the Senate parliamentarian to violate the budget rules that Republicans must follow to pass their bill through a process that shields it from a Democratic filibuster. As a result, the bill changed slightly in the Senate, and the House will now need to vote on it again since both chambers must approve identical legislation. Among the items that were deemed out of order was the title of the bill: the Tax Cuts and Jobs Act.

The approval of the bill in the House and Senate came over the strenuous objections of Democrats, who have accused Republicans of giving a gift to corporations and the wealthy and driving up the federal debt in the process.