For many small Puerto Rican towns, pharmaceutical plants are a lifeline.

Barceloneta, a coastal town of 22,322 that once was known as "Pineapple City," is a case in point. It has become a pharmaceutical manufacturing hub and the Western Hemisphere's biggest producer of Viagra, the pioneering treatment for impotence.

Freddie Melendez, 63, remembers the poverty here before the drug companies arrived. He would cut sugar cane and throw it on an ox-drawn cart for 50 cents an hour after school. "I would walk to school barefoot with my shoes over my shoulder," he said, sipping slowly on a Coors Light at a bar whose walls were covered with drawings depicting the bygone cane and pineapple industries.

Things changed when Illinois-based Abbott Laboratories arrived in 1969. Melendez turned to construction and helped build the plant's foundation, making 10 times more money than he ever could cutting cane. He now owns a small house.

Four companies in town employ 7,870 people, making pharmaceutical manufacturing Barceloneta's No. 1 industry. The town pumps out 100 million Viagra pills a year, exporting virility to bedrooms in the United States and farther. Pharmaceuticals pay about $10 million in taxes annually to the municipal government, nearly half the town's $24.1 million budget.

However, the tax incentives that transformed the U.S. Caribbean territory from an impoverished agrarian society to a high-tech pharmaceutical powerhouse are ending Dec. 31, 2005. And with the loss of those incentives, some fear companies could relocate to competing countries such as neighboring Dominican Republic, or Ireland and Switzerland.

Their departure could change the fortunes of small towns such as Barceloneta and Jayuya.

It could cause wide-scale unemployment, decreasing property values and the closings of private businesses, said Jose Joaquin Villamil, a financial analyst at San Juan-based Estudios Tecnicos Inc., a consulting firm.

"The effects would be considerable," he said. "Even beauty parlors and clothing stores would be affected. There is a big concentration of industry in a small area, and it provides high salaries compared to other sectors, allowing residents to support private businesses."

Barceloneta, a coastal town with black sand beaches, was founded in 1881 by a man who said it evoked fond memories of his Spanish hometown of Barcelona. Some pineapple fields still ring the town, but the majority have been built over, including the fields of a plant that once produced a locally popular brand of juice called Lotus.

On the edge of town today, Viagra signs line a motocross track. At the 250-acre Pfizer Inc. plant, which sits atop a former pineapple plantation on the other side of town, hordes of workers dressed in white sanitary gowns and masks tend machines that spit pills into a bucket. Outside the plant is a bustling crossroads that connects Barceloneta with three nearby towns. American fast-food chains and a string of other businesses have sprouted up here in a sign of the sustained economic development.

In 1976, Congress passed Section 936 of the U.S. Internal Revenue Service tax code, allowing companies operating on the island to send all profits tax-free to the U.S. mainland.

A budget-cutting Congress scaled back the credit in the 1990s and repealed it in 1996, when some legislators vilified it as corporate welfare. Then-Sen. David Pryor (D-Ark.) ridiculed it as the "mother of all tax breaks."

But the incentives brought wealth to Puerto Rico, which today manufactures 19 of the 25 top-selling prescription drugs in the world, according to the trade publication IMS World Review.

Eighty pharmaceutical plants on the island employ nearly 30,000 people, and the industry has provided thousands of indirect jobs. Pharmaceutical exports increased to $36.8 billion in 2003 from $28 billion in 2001, said Eloisa Cruz, spokeswoman for the Puerto Rico Industrial Development Co., or PRIDCO, a government agency responsible for luring business to the island.

The loss of the tax credits could reverse all those gains.

"This is the first time since the early 20th century that Puerto Rico does not have a tax incentive geared to Puerto Rico," lamented Hiram Ramirez Rangel, executive director of PRIDCO.

Industry analysts play down the risk of flight.

"I don't foresee an immediate large exodus," said tax lawyer Brian Andreoli, who worked in Puerto Rico for 16 years before moving to New York City. "Puerto Rico makes business sense for a lot of these companies because of the attributes of the island including the workforce, education system and the assets these firms already have."

In addition, he said, "Puerto Rico's unique status [as a U.S. commonwealth] allows them to import and export as if it's part of the United States from a customs point of view."

To pull the plug and move to another country would cost each company tens of millions of dollars and at least two years in constructing new facilities, said Andreoli, who recently co-wrote an article in the World Trade magazine headlined "Puerto Rico Remains Strong."

Ramirez said tax incentives still exist, pointing to controlled foreign corporation protection that allows U.S. companies to send dividends through foreign affiliates, but not to parent companies on the U.S. mainland.

Large pharmaceuticals will be able to weather the change, officials said.

"It was a hard blow," said Jorge Gonzalez Monclova, a Pfizer spokesman. But he said that New York-based Pfizer is able to remain profitable in Puerto Rico by producing cutting-edge pharmaceuticals including the top-selling Lipitor, which reduces cholesterol.

Small drug companies will suffer the most and it would be less attractive for them to establish themselves in Puerto Rico, Ramirez said.

But he predicts the overall effects will be minimal.

Even since the announcement of the tax credit phase-out, the industry has grown, adding 4,000 jobs since 2001, Ramirez said, even as he acknowledged the challenges ahead.

"It's making us work harder on our business fundamentals," he said. "We have to do a better job of targeting companies in Europe and elsewhere."