WASHINGTON — Republicans were for President Obama’s requirement that Americans get health insurance before they were against it.

The obligation in the new health care law is a Republican idea that’s been around at least two decades. It was once trumpeted as an alternative to Bill and Hillary Clinton’s failed health care overhaul in the 1990s. These days, Republicans call it government overreach.

Mitt Romney, weighing another run for the GOP presidential nomination, signed such a requirement into law at the state level as Massachusetts governor in 2006. At the time, Romney defended it as “a personal responsibility principle” and Massachusetts’ newest GOP senator, Scott Brown, backed it. Romney now says Obama’s plan is a federal takeover that bears little resemblance to what he did as governor and should be repealed.

Republicans say Obama and the Democrats co-opted their original concept, minus a mechanism they proposed for controlling costs. More than a dozen GOP attorneys general are determined to challenge the requirement in federal court as unconstitutional.

Starting in 2014, the new law will require nearly all Americans to have health insurance through an employer, a government program or by buying it directly.

That year, new insurance markets will open for business, health plans will be required to accept all applicants and tax credits will start flowing to millions of people, helping them pay the premiums.