(CNN) -

President Barack Obama applauded the Supreme Court's decision Thursday to uphold his controversial health care reform legislation, which has endured relentless debate since it was signed into law in 2010.

Speaking in the East Room of the White House, Obama said the ruling was "a victory for people all over this country whose lives will be more secure because of this law."

In a 5-4 ruling, the high court decided the individual mandate requiring people to have health insurance is valid as a tax, even though it is impermissible under the Constitution's commerce clause.

While Obama acknowledged the issue has been "divisive" in the years since he assumed office, he maintained his push for the law was not driven by politics.

"I didn't do this because it was good politics," Obama said. "I did it because I believed it was good for the country. I did it because I believed it was good for the American people."

Regardless, the political implications of the decision are widely expected to amplify as a major talking point on the campaign trail. Presumptive GOP nominee Mitt Romney has repeatedly vowed to repeal the law on his first day in office if he becomes president.

"What the court did not do on its last day in session, I will do on my first day if elected president of the United States, and that is, I will act to repeal Obamacare," Romney said Thursday, responding to the decision.

Obama, for his part, took a swipe at his opponent in his address, pointing to Romney's own health care law as former Massachusetts governor--a measure after which Democrats say the federal health care law was modeled, as it also included a mandate to buy insurance.

"Even though I knew it wouldn't be politically popular, and resisted the idea when I ran for this office, we ultimately included a provision in the Affordable Care Act that people who can afford to buy health insurance should take the responsibility to do so," Obama said. "In fact this idea has enjoyed support from members of both parties, including the current Republican nominee for president."

Now that the Supreme Court has ruled the individual mandate is a tax, not a penalty, political analysts say Republicans will likely argue that Obama's legislation introduces a mammoth tax onto the American public.

However, Obama said Thursday his administration will keep fighting to protect it.

"The highest court in the land has now spoken," Obama said. "We will continue to implement this law."