Connecticut’s General Fund is getting an injection of nearly $5 million thanks to a settlement with a pharmaceutical company involving the Medicaid program.

The state is part of a $784.6 million settlement with drugmaker Wyeth that resolves claims the company knowingly underpaid rebates it owed under the Medicaid Drug Rebate Program for sales of its drug.

Protonix, the brand name for pantoprazole, is used to treat heartburn and other symptoms caused by stomach acid.

State Attorney General George Jepsen, Chief State’s Attorney Kevin Kane, and Department of Social Services Commissioner Roderick Bremby announced the settlement.

The Medicaid Drug Rebate Program dates back to 1990 when Congress created it in an effort to contain costs for Medicaid’s payment of prescription drugs, according to state officials. The program requires drugmakers that participate to pay quarterly rebates to state Medicaid programs for each drug sold to pharmacies that were reimbursed by Medicaid, according to state officials.

The quarterly rebate is set from each drugmaker’s “best price,” or the lowest price for which it sold the drug in a particular quarter.

Connecticut, along with other states and the federal government, claim that from 2001 to 2006 Wyeth sold Protonix Oral tablets and Protonix IV to hospitals at discounted prices. They allege that Wyeth’s contracts with hospitals linked discounts available for Protonix IV with discounts for Protonix Oral tables, but the company didn’t reflect that accurately in the rebate program.

As a result, state and federal officials say, the company’s “best price” was not reported correctly and rebate amounts paid to states were much lower than they ought to have been.

Wyeth was bought by Pfizer Inc. in 2009. Pfizer officials said Tuesday the agreement originally was announced in February and finalized last week.

“We are pleased to have finalized the agreement to resolve these cases, which involve historic conduct that occurred at least 10 years ago, before we acquired Wyeth,” said Doug Lankler, executive vice president and general counsel at Pfizer. “The resolution of these claims reflects our desire to put these historic cases behind us and to focus on the needs of patients.”

Under the settlement, $10.1 million is attributable to the state and federal shares of Connecticut’s Medicaid program, according to state officials. The state’s net share is just under $5 million, which will go into the General Fund.

The finalization of the agreement comes as Connecticut lawmakers grapple a nearly $1 billion budget deficit. Legislative analysts have estimated that Jepsen’s office will raise $40 million in revenue from legal settlements. Jepsen said state officials continuously monitor the state’s Medicaid program for signs of improper billing practices.

“Improper billing practices involving our Medicaid program will not be tolerated,” Jepsen said in a statement. “We are vigilant in working with our federal and state law enforcement partners to identify and prosecute fraudulent and abusive conduct, and we will continue to work to hold accountable those who seek to defraud and overcharge our taxpayers.”

Kane added, in a statement: “With limited resources available to help those who are truly in need, it is critical that we get the most from each tax dollar.”

Rebates from drugmakers help state Medicaid programs offset costs to taxpayers, Bremby said.

“Connecticut’s share of this settlement — nearly $5 million — is a welcome development and another reminder that protecting the integrity of the Medicaid program requires continual oversight,” he said in a statement.