(CNN) -- Imagine being charged with a crime, but an imaginary friend takes the rap for you.

That is essentially what happened when Pfizer, the world's largest pharmaceutical company, was caught illegally marketing Bextra, a painkiller that was taken off the market in 2005 because of safety concerns.

When the criminal case was announced last fall, federal officials touted their prosecution as a model for tough, effective enforcement. "It sends a clear message" to the pharmaceutical industry, said Kevin Perkins, assistant director of the FBI's Criminal Investigative Division.

But beyond the fanfare, a CNN Special Investigation found another story, one that officials downplayed when they declared victory. It's a story about the power major pharmaceutical companies have even when they break the laws intended to protect patients.

Big plans for Bextra

The story begins in 2001, when Bextra was about to hit the market. The drug was part of a revolutionary class of painkillers known as Cox-2 inhibitors that were supposed to be safer than generic drugs, but at 20 times the price of ibuprofen.

Pfizer and its marketing partner, Pharmacia, planned to sell Bextra as a treatment for acute pain, the kind you have after surgery.

But in November 2001, the U.S. Food and Drug Administration said Bextra was not safe for patients at high risk of heart attacks and strokes.

The FDA approved Bextra only for arthritis and menstrual cramps. It rejected the drug in higher doses for acute, surgical pain.

Promoting drugs for unapproved uses can put patients at risk by circumventing the FDA's judgment over which products are safe and effective. For that reason, "off-label" promotion is against the law.

If we prosecute Pfizer ... a lot of the people who work for the company who haven't engaged in criminal activity would get hurt.--Mike Loucks, federal prosecutor

But with billions of dollars of profits at stake, marketing and sales managers across the country nonetheless targeted anesthesiologists, foot surgeons, orthopedic surgeons and oral surgeons. "Anyone that use[d] a scalpel for a living," one district manager advised in a document prosecutors would later cite.

A manager in Florida e-mailed his sales reps a scripted sales pitch that claimed -- falsely -- that the FDA had given Bextra "a clean bill of health" all the way up to a 40 mg dose, which is twice what the FDA actually said was safe.

Doctors as pitchmen

Internal company documents show that Pfizer and Pharmacia (which Pfizer later bought) used a multimillion-dollar medical education budget to pay hundreds of doctors as speakers and consultants to tout Bextra.

Pfizer said in court that "the company's intent was pure": to foster a legal exchange of scientific information among doctors.

But an internal marketing plan called for training physicians "to serve as public relations spokespeople."

According to Lewis Morris, chief counsel to the inspector general at the U.S. Department of Health and Human Services, "They pushed the envelope so far past any reasonable interpretation of the law that it's simply outrageous."

Pfizer's chief compliance officer, Doug Lanker, said that "in a large sales force, successful sales techniques spread quickly," but that top Pfizer executives were not aware of the "significant mis-promotion issue with Bextra" until federal prosecutors began to show them the evidence.

By April 2005, when Bextra was taken off the market, more than half of its $1.7 billion in profits had come from prescriptions written for uses the FDA had rejected.

Too big to nail

But when it came to prosecuting Pfizer for its fraudulent marketing, the pharmaceutical giant had a trump card: Just as the giant banks on Wall Street were deemed too big to fail, Pfizer was considered too big to nail.

Why? Because any company convicted of a major health care fraud is automatically excluded from Medicare and Medicaid. Convicting Pfizer on Bextra would prevent the company from billing federal health programs for any of its products. It would be a corporate death sentence.

Prosecutors said that excluding Pfizer would most likely lead to Pfizer's collapse, with collateral consequences: disrupting the flow of Pfizer products to Medicare and Medicaid recipients, causing the loss of jobs including those of Pfizer employees who were not involved in the fraud, and causing significant losses for Pfizer shareholders.

Public records show that the subsidiary was incorporated in Delaware on March 27, 2007, the same day Pfizer lawyers and federal prosecutors agreed that the company would plead guilty in a kickback case against a company Pfizer had acquired a few years earlier.

As a result, Pharmacia & Upjohn Co. Inc., the subsidiary, was excluded from Medicare without ever having sold so much as a single pill. And Pfizer was free to sell its products to federally funded health programs.

Two years later, with Bextra, the shell company once again pleaded guilty. It was, in effect, Pfizer's imaginary friend stepping up to take the rap.

"It is true that if a company is created to take a criminal plea, but it's just a shell, the impact of an exclusion is minimal or nonexistent," Morris said.

Prosecutors say there was no viable alternative.

"If we prosecute Pfizer, they get excluded," said Mike Loucks, the federal prosecutor who oversaw the investigation. "A lot of the people who work for the company who haven't engaged in criminal activity would get hurt."

Did the punishment fit the crime? Pfizer says yes.

It paid nearly $1.2 billion in a criminal fine for Bextra, the largest fine the federal government has ever collected.

It paid a billion dollars more to settle a batch of civil suits -- although it denied wrongdoing -- on allegations that it illegally promoted 12 other drugs.

To prevent it from happening again, Pfizer has set up what it calls "leading-edge" systems to spot signs of illegal promotion by closely monitoring sales reps and tracking prescription sales.

It's not entirely voluntary. Pfizer had to sign a corporate integrity agreement with the Department of Health and Human Services. For the next five years, it requires Pfizer to disclose future payments to doctors and top executives to sign off personally that the company is obeying the law.

Pfizer says the company has learned its lesson.

But after years of overseeing similar cases against other major drug companies, even Loucks, isn't sure $2 billion in penalties is a deterrent when the profits from illegal promotion can be so large.

"I worry that the money is so great," he said, that dealing with the Department of Justice may be "just of a cost of doing business."