In a ruling issued on Wednesday, U.S. lawmakers and their staffs will continue to receive a federal contribution toward the health insurance that they must purchase through soon-to-open exchanges created by President Barack Obama's signature healthcare law.

The decision by the Office of Personnel Management, with Obama's blessing, will prevent the largely unintended loss of healthcare benefits for 535 members of the Senate and House of Representatives and thousands of Capitol Hill staff.

When Congress passed the health reform law known as Obamacare in 2010, an amendment required that lawmakers and their staff members purchase health insurance through the online exchanges that the law created. They would lose generous coverage under the Federal Employees Health Benefits Program.