Barack Obama on Friday credited supporters of the Affordable Care Act for saving his signature legislation from Republican-led efforts to dismantle it, while the former president acknowledged that the law can be improved.

Obamacare remains the law "because of everyone who mobilized, organized and made their voices heard," a spokesman for Obama said in a statement following the GOP’s failed attempt to repeal parts of the legislation.

"President Obama has always said we should build on this law, just as members of both parties worked together to improve Social Security, Medicare, and Medicaid over the years," Obama spokesman Kevin Lewis said. "President Obama still believes that it is possible for Congress to demonstrate the necessary bipartisanship and political courage to keep delivering on the promise of quality, affordable health insurance for every American."

GOP efforts to repeal parts of Obamacare fell short early Friday morning when three Republican senators, along with all Democrats, voted against it.

Democratic groups flooded the halls of the Capitol and GOP town hall events around the country to protest the GOP’s repeal efforts.

"The Affordable Care Act has always been about something bigger than politics," Obama's statement said. "It's about the character of our country.... It's about the dreams protected, and the untold misery and ruin prevented."

Obama had remained largely on the sidelines during the debate over Obamacare this year.