Patent Commissioner Gerald J. Mossinghoff yesterday resigned from the Reagan administration to accept what he called "a very good offer" to take over the presidency of the Pharmaceutical Manufacturers Association.

The Washington-based PMA is a trade association representing companies that produce most of the prescription medicines in the United States.

Earlier this year, the trade association was embroiled in a legislative battle that split the ranks of its members and was followed by the resignation of then-PMA president Lewis A. Engman. As patent commissioner, Mossinghoff was a major figure in the fight.

The dispute was over what became the Drug Price Competition and Patent Term Restoration Act of 1984. Dissident companies in PMA's ranks pushed to get a longer patent life for brand-name drugs in exchange for making it easier for generic medicine to get to market at the end of a drug's patent life.

The law, in effect, adds five years to the normal patent life for new products, which was 17 years prior to passage. Many drug manufacturers said the extra time was necessary because much of that 17-year period was eaten up in lengthy federal approval processes. Those delays often reduced effective patent life, which begins when a new product goes on sale, to as little as seven years. The longer effective patent life was needed to help companies improve recovery of research and development costs, the dissident companies said.

Mossinghoff publicly supported the approved drug-patent legislation over an earlier bill that would have been less favorable to drug manufacturers. The earlier bill largely was fashioned by former PMA president Engman, who resigned under pressure Aug. 31.

Engman was replaced by Joseph Stetler, who had given up the PMA presidency to Engman in 1979. Stetler agreed to take the job on a full-time basis for six months, and on a half-time basis for a year after that.

Mossinghoff's support of the bill "literally had nothing to do" with his selection, Stetler said.

Stetler said a PMA search committee spent the last two months interviewing candidates for the association's top job. He said that the committee recommended Mossinghoff as the best of the lot, even though "he is not well-known in our industry and doesn't particularly have industry experience."

In announcing Mossinghoff's appointment yesterday, PMA Chairman Joseph D. Williams said: "Mr. Mossinghoff's outstanding professional and academic qualifications, his Washington experience, international patent activities, and his accomplishments as U.S. Commissioner of Patents & Trademarks make him an excellent choice to lead the association."

Mossinghoff, 49, became patent commissioner in 1981. He spent much of that time working on programs to automate the Patent and Trademark Office's antiquated filing system -- a paper-file affair, the inefficiency of which contributed greatly to the time required for patent approval. His term as PMA president begins Jan. 22.

Mossinghoff said yesterday that his position on the patent bill "was totally consistent" with his drive to increase the efficiency of the patenting process and to encourage research and development in general. He said he welcomes his new job as a challenge to work with companies that "are in the forefront of research and development in health care and medicine."