CNN and Fox News were left with egg on their faces on Thursday, as they got the Supreme Court's ruling on President Obama's health care law wrong — and even managed to make Obama initially think his health care law had been partially overturned.

The trouble started early for CNN. Congressional correspondent Kate Boulduan read out part of the Court's ruling, which said that the individual mandate could not be upheld using the Commerce Clause. Disastrously, though, it failed to pick up the other part of the ruling, which said that it could be upheld as a tax.

"Wow, that's a dramatic moment," Wolf Blitzer said, as a chyron saying "SUPREME CT. KILLS INDIVIDUAL MANDATE" flashed on the screen.

"The Justices have just gutted, Wolf, the centerpiece provision of the health care law," John King said, adding that it was a "direct blow to President Obama."

Later, Boulduan returned to correct the initial report. She said that the Court had released a "very confusing large opinion" and that on the second read, it was apparent that the network had gotten it wrong. "The entire law has been upheld, Wolf," she said.

She said that the decision was "thick" and "legally dense," scanning the papers on-air.

"It's a huge, huge victory for President Obama," Blitzer said.

Later, the network's chief legal analyst Jeffrey Toobin explained the snafu, saying that the intricacies of the ruling had tripped people up.

"Five minutes into Chief justice Robert’s opinion, you would have asked anyone in that room whether this law was going to be held unconstitutional, I think we all would have said yes," he said. "But we were all sitting there, we had to sit till the end, and this turn of events surprised me, that’s for sure."

It also sent out breaking news alerts saying that the mandate had been struck down. It was later forced to issue a correction.

The network addressed the error in a statement. A spokesperson explained how it happened and said, "CNN regrets that it didn't wait to report out the full and complete opinion regarding the mandate. We made a correction within a few minutes and apologize for the error.”

BuzzFeed reported that the error had caused considerable consternation within CNN.

"It's outrageous and embarrassing,” one staffer told the site's Michael Hastings. “Maybe this will shake the company into understanding that CNN has not been the 'most trusted name in news' for a very long time."

Fox News made the same mistake, initially saying the mandate had been struck down before switching its headline:

“We have breaking news here on the Fox News Channel," anchor Bill Hemmer said. "The individual mandate has been ruled unconstitutional."

Megyn Kelly jumped in. "We're getting conflicting information," she said. Later, the network's EVP of news-editorial Michael Clemente defended the reporting. He said in a statement,

We gave our viewers the news as it happened. When Justice Roberts said, and we read, that the mandate was not valid under the Commerce clause, we reported it. Bill Hemmer even added, be patient as we work through this. Then when we heard and read, that the mandate could be upheld under the government’s power to tax, we reported that as well—all within two minutes. By contrast, one other cable network was unable to get their Supreme Court reporter to the camera, and said as much. Another said it was a big setback for the President. Fox reported the facts, as they came in.

ABC News reported later on Thursday that the false reports resonated all the way up to the Oval Office:

Standing with White House chief of staff Jack Lew and looking at a television in the “Outer Oval” featuring a split screen of four different networks, the president saw graphics on the screens of the first two cable news networks to break the news — CNN and Fox News Channel — announcing, wrongly, that he had lost. Senior administration officials say the president was calm. A couple minutes later, White House counsel Kathy Ruemmler came to Outer Oval and gave him two thumbs-up. Ruemmler had gotten the correct information from a White House lawyer at the Supreme Court and from SCOTUSblog.com.

The Huffington Post was not immune to the confusion. A tweet from the Politics section initially said that the mandate had been struck down. It was later retracted:

CNN, Fox News get health care ruling wrong http://t.co/3IrzDqih We jumped the gun in following them. Apologies for the confusion. — HuffPost Politics (@HuffPostPol) June 28, 2012

Meanwhile, MSNBC president Phil Griffin sent a congratulatory email to staff. (MSNBC, unlike its rivals, got the ruling right.)

"Your work today set us apart from the competition," he wrote.