Federal officials and major drugmakers are scrambling to prevent national shortages of critical drugs for treating cancer, diabetes and heart disease, as well as medical devices and supplies, that are manufactured at 80 plants in hurricane-ravaged Puerto Rico.

Pharmaceuticals and medical devices are the island’s leading exports, and Puerto Rico has become one of the world’s biggest centers for pharmaceutical manufacturing. Its factories make 13 of the world’s top-selling brand-name drugs, from Humira, the rheumatoid arthritis treatment, to Xarelto, a blood thinner used to prevent stroke, according to a report released last year.

With business of nearly $15 billion a year at stake in Puerto Rico, drug companies and device makers are confronting a range of obstacles on the island: locating enough diesel fuel for generators to run their factories; helping their employees get to work from areas where roads are damaged and blocked, electricity is down and phones don’t work. Companies have taken out radio ads pleading with workers to check in. The pharmaceutical and device industries contribute to the employment of nearly 100,000 people on the island, according to trade groups.

“Some of these products are critical to Americans,” Scott Gottlieb, the commissioner of the Food and Drug Administration, told a congressional panel this week. “A loss of access could have significant public health consequences.”

Dr. Gottlieb, who visited F.D.A. staff in Puerto Rico last week, told the House Energy and Commerce Committee’s subcommittee on Health: “We have a list of about 40 drugs that we’re very concerned about. It reflects maybe about ten firms.”

Thirteen of the drugs, Dr. Gottlieb said, are “sole-source,” meaning the product is only made by one company. Those include H.I.V. medications injectable drugs and sophisticated medical devices, although he did not name the products. The biggest problem, he said, was not damage to the factories, but the instability of the electric supply. Manufacturers are worried that a long-term lack of connection to major power grid could jeopardize their products, and are also wary of relying on the more limited electrical grids that the territory is likely to activate as a first step to restoring power.

One of the drugs F.D.A. officials said they were concerned about was methotrexate, which treats childhood leukemia and other diseases. It has been scarce, off and on, for several years. Mylan makes the product in Puerto Rico, and all five manufacturers of the injectable form of the drug have reported shortages of the product, according to a list maintained by the American Society of Health-System Pharmacists.

In a statement, Mylan did not address the methotrexate shortage but said it was “working closely with F.D.A. to help address drug shortage concerns.” Its plant has sources of water, electricity and communication, and the company said it is “working on ways to make them sustainable for manufacturing purposes.” Like other companies, it said it was focusing on helping employees and other residents of the island with basic needs, including chartering a cargo plane carrying essential goods to deliver to them.

Several pharmaceutical and medical device companies said their factories were coming back on line with the assistance of generators and that they did not anticipate supply shortfalls. But others said the situation was precarious. Drug companies depend on consistent refrigeration to avoid shortages. And device makers are wondering when the power grid would be back up, which some officials have predicted could take months.

“Everybody is struggling to get diesel fuel — that’s just widespread,” said Antonio Medina, an independent consultant who until last year was executive director of the Puerto Rico Industrial Development Company, a government-run group that promotes manufacturing.

Wilberto Maldonado, a pharmaceutical consultant in Puerto Rico, said drug and device makers are navigating a logistical “nightmare,” especially when trying to get access to fuel for their generators.

With phone lines down, “many employers have people still unaccounted for,” Mr. Maldonado said in a message through LinkedIn. “This may not improve, as telecom service providers are also depending on backup generators.”

Industry officials have sought to strike a delicate balance in making their case for help without appearing to divert precious resources from hospital and other emergency services. Returning the drug and device industry to its feet, however, is crucial for ensuring the island’s economic recovery as well as safeguarding the supply of medicines and devices to the rest of the United States.

If the manufacturing plants are slow to fully recover, some companies could shift their production elsewhere, said Deepak Lamba-Nieves, research director at the Center for a New Economy, a nonpartisan economic think tank in Puerto Rico. “That may have medium and long-term consequences for an island that is going to be hugely and severely impacted by this hurricane for many years to come,” he said.

Lobbyists and executives from health care companies met Tuesday with the Department of Health and Human Services and the Federal Emergency Management Agency to make their pitch for assistance.

AdvaMed, the trade group for the device makers, said its requests included priority access as the electricity grid is restored.

“Even if companies are fine now with diesel fuel, we want to make sure we’re in the queue in terms of priority,” said Greg Crist, a spokesman for AdvaMed. “Because if there is an electricity shortage well into November, for example, how can we as an industry make sure we are in line for those priorities, once you’ve taken care of hospitals and essential needs?”

While AdvaMed has outlined its members’ challenges, its pharmaceutical counterpart — the Pharmaceutical Research and Manufacturers of America — provided fewer specifics and referred questions to Healthcare Ready, an industry group that is coordinating the recovery operations in Puerto Rico.

Several drug companies said that while their plants lost power and were forced to shut down, they were not anticipating a disruption in supply. “We have a strong local team working through incredible logistical challenges, and we’re seeing progress each day,” said Ernie Knewitz, a spokesman for Johnson & Johnson. Tylenol and Prezista, an H.I.V. drug, are among the products that the company manufactures in Puerto Rico. “We are also closely monitoring our product inventory levels and will work to ensure all critical needs are met.”

The industry’s rosy outlook, presumably offered in part to assure nervous shareholders, contrasted with the concern expressed by Dr. Gottlieb.

“We know that the grid is going to be unstable for a long period of time,” Dr. Gottlieb said. “The generators were never meant to operate for months and months on end.”

Erin Fox, a drug shortage expert at the University of Utah, said she and other hospital pharmacists were monitoring the situation, and are worried that the storm’s impact could exacerbate the United States’ already dire drug-shortage problem.

Ms. Fox said companies typically do not disclose where they manufacture their drugs because it is considered a trade secret. Several companies declined to list which products they made in Puerto Rico.

“Because we have no transparency around that,” she said, “it’s actually hard to know the true impact of this.”

Baxter, a medical-supply company, has said that it is limiting shipments of products made in Puerto Rico to conserve its supply, including small bags of dextrose and saline, which are used by hospitals to prepare medication. Hospitals will be limited to their typical monthly shipment to prevent some institutions from stockpiling the products.

Ms. Fox said hospitals rely on these small bags of saline solution to mix medicines for patients, and “an allocation doesn’t guarantee that you will get some,” she said.

A few years ago, Baxter was at the center of a shortage of large saline bags that led to state and federal investigations into its business practices.

Baxter said its three manufacturing sites in Puerto Rico sustained “some damage,” and said that “limited production activities” had resumed at all of its plants.

Puerto Rico has been a hub of drug manufacturing for decades — companies were lured to the island because of tax breaks and its access to the U.S. market, along with skilled employees who worked for lower wages. About a decade ago, expiring tax incentives led to a wave of factory closings, stoking fears that the industry was in jeopardy.

Today, the drug and device industries remain a mainstay of the Puerto Rican economy. Pharmaceutical and medical manufacturing accounted for nearly three-quarters of Puerto Rico’s exports in 2016, of $14.5 billion, according to the federal Bureau of Labor Statistics.

“These are some of the best jobs,” Mr. Medina said.

Dr. Gottlieb hopes the companies stay there.

“A highly skilled, highly dedicated and highly productive Puerto Rican work force enables the success of the industry,” Dr. Gottlieb said. “if they decide to relocate after this disaster, it would jeopardize the island’s economic future.”