The ruling was 5-4 with Justice Alito writing for the majority. Via MSNBC:
The Supreme Court has ruled that a closely-held company can be exempt from the contraceptive coverage under the Affordable Care Act. The closely watched case pitted the administration and its allies, including women’s health advocates, against the religious right, which has repeatedly accused President Barack Obama of waging a war on religion in the public square.
Hobby Lobby Stores, an Oklahoma-based, evangelical-owned craft chain with about 13,000 employees, and Conestoga Wood Specialties, a small Mennonite-owned cabinet maker in Pennsylvania, were two of the 49 for-profit companies that said the requirement violated their religious freedom. The Obama administration had provided exemptions for the law for houses of worship and an accommodation for religious nonprofits (the subject of pending litigation) but not for for-profit corporations.
The Religious Freedom Restoration Act, the law at issue in the case, has never been applied to for-profit entities. The Court had to decide whether corporations even have religious exercise rights – making the beliefs of the employer synonymous with the entire company – and weigh that question against the potential harms to the employees.