Hill-Rom Holdings Inc., a medical-equipment company in Indiana, agreed Tuesday to pay nearly $42 million to settle a government lawsuit that alleged Medicare fraud.

The government had accused the company of knowingly submitting false claims to Medicare from 1999 to 2007 for bed support surfaces meant to treat pressure ulcers and bedsores. According to the charges, Hill-Rom asked "numerous and repeated" times for payment from Medicare for patients who no longer qualified for it, including patients who had died or were no longer using the equipment.

According to the charges, Hill-Rom would automatically bill Medicare for "long periods of time," ''without making any reasonable effort to determine if the patients for whom it submitted the claims continued to meet Medicare conditions for payment."

Hill-Rom denied wrongdoing.

"Hill-Rom is dedicated to the highest standards of business conduct and integrity," the company said in a statement. "We vigorously disagree that there was any wrongdoing in this situation and this settlement does not represent any admission on our part."

Shares rose 3.6 percent to $31.29, as investors reacted favorably to the certainty the settlement provides.

Still, shares haven't recovered from the fall they took July 28, when they fell to $36.25 from $43.88. That was the day after the company said in its third-quarter earnings report that it was close to a settlement on the federal charges. It also announced then that it had set aside money to pay for the settlement.

The U.S. Attorney's Office for the Eastern District of Tennessee said the $41.8 million settlement is its largest civil fraud recovery ever. More than $8 million will go to two whistleblowers who helped with the government's investigation, nurses who worked as sales representatives for Hill-Rom.