The Senate on Thursday passed legislation repealing the core pillars of the Affordable Care Act (ObamaCare), taking a major step toward sending such a bill to the president’s desk for the first time.

The measure passed 52 to 47 after the Senate voted to significantly strengthen the bill originally passed by the House and brought straight to the floor by Majority Leader Mitch McConnell (R-Ky). The House will need to approve the amended legislation before it can be sent to the White House.

The measure guts the law by repealing authority for the federal government to run healthcare exchanges, and scrapping subsidies to help people afford plans bought through those exchanges. It zeros out the penalties on individuals who do not buy insurance and employers who do not offer health insurance.

The bill also would strip federal funding for one year from Planned Parenthood.

The White House has already said that President Barack Obama will veto the legislation once it reached his desk, and Republicans do not have the two-thirds majority needed to override that veto.