A federal judge in Boston has signed off an agreement by British drugmaker GlaxoSmithKline pleaded guilty to illegal promotion of two drugs and failure to provide clinical data on another and to pay $3 billion for criminal and civil violations involving 10 drugs that are taken by millions of people.

GSK (NYSE: GSK), which operates its North American headquarters in RTP, and federal prosecutors announced the settlement on Monday.

The company pleaded guilty Thursday in U.S. District Court to promoting popular antidepressants Paxil and Wellbutrin for unapproved uses.

That investigation resulted from reports of GSK employee “whistle blowers.”

U.S. District Judge Rya A. Zobel in Boston orderd Glaxo to pay a criminal fine of $956.8 million and forfeit $43 million, the DOJ said in a statement Thursday.

The $3 billion settlement, the largest-ever in a health- care fraud case in the U.S., includes $2 billion in civil payments to the U.S. and the states. The settlement also requires Glaxo to abolish incentive compensation for its sales force and publish all GSK human research studies, not just those with positive outcomes for the company’s drugs, the DOJ said.

“With these groundbreaking changes, GSK has committed to putting patients before profits; science before sales,” Carmen Ortiz, U.S. attorney for the District of Massachusetts, said in a statement. “We hope the rest of the pharmaceutical industry follows suit.”

GSK pleaded guilty to marketing the depression medications Paxil and Wellbutrin for uses not approved by the U.S. Food and Drug Administration and for failing to report clinical data on Avandia, a diabetes drug, federal prosecutors said.

Under federal law, while doctors are allowed to prescribe medications for unapproved uses, drug companies are barred from promoting such sales. Promotion by a manufacturer for off-label uses renders the product misbranded, the U.S. said July 2. GSK pleaded guilty to misbranding Paxil and Wellbutrin, the U.S. said.

The $3 billion total settlement surpasses the previous record, a $2.3 billion accord that Pfizer Inc. entered in 2009 over marketing of the painkiller Bextra and other drugs.

Glaxo, the U.K.’s largest drugmaker, last year set aside $3.4 billion to cover the cost of the settlement, which resolves a seven-year investigation of the company’s marketing practices for the three drugs. The reserve brought to $6.4 billion the amount the drug maker has set aside for legal costs tied to Avandia and the other medicines.

Federal prosecutors began an investigation in Colorado in 2004, later taken over by the U.S. attorney in Massachusetts, into whether Glaxo promoted drugs for unapproved uses and into ways Glaxo potentially influenced doctors. The probe concerned nine of the company’s best-selling products from 1997 to 2004, including the Advair lung treatment, Glaxo said in its annual report.

The company also pleaded guilty to failing to report to the government some safety problems with Avandia. The diabetes drug was restricted in the U.S. and banned in Europe after it was found in 2007 to sharply increase the risks of heart attacks and congestive heart failure.

On Monday, GSK’s chief executive officer and its head of North American operations issued statements about GSK’s change of direction under their leadership.