A scientific panel that shaped the federal government’s policy for testing the safety and effectiveness of painkillers was funded by major pharmaceutical companies that paid hundreds of thousands of dollars for the chance to affect the thinking of the Food and Drug Administration, according to hundreds of e-mails obtained by a public records request.

The e-mails show that the companies paid as much as $25,000 to attend any given meeting of the panel, which had been set up by two academics to provide advice to the FDA on how to weigh the evidence from clinical trials. A leading FDA official later called the group “an essential collaborative effort.”

Patient advocacy groups said the electronic communications suggest that the regulators had become too close to the companies trying to crack into the $9 billion painkiller market in the United States. FDA officials who regulate painkillers sat on the steering committee of the panel, which met in private, and co-wrote papers with employees of pharmaceutical companies.

The FDA has been criticized for failing to take precautions that might have averted the epidemic of addiction to prescription drugs including Oxycontin and other opioids.