The nation’s last full-time sardine cannery is being given a second life, four months after it closed, by a company that will operate it as a lobster processing plant.

Bumble Bee Foods LLC said Wednesday that it has agreed to sell the former Stinson Seafood plant in Prospect Harbor to Massachusetts-based Live Lobster Co. Inc.

The Stinson plant was the victim of foreign competition and declining demand for sardines. Bumble Bee closed it in April after a century of operation, putting nearly 130 employees out of work.

Live Lobster expects to create as many as 40 jobs in the first year and 120 within two years. The plant will be used at first to buy and sell lobsters, with lobster processing operations beginning next year.

Officials said the purchase is expected to be complete within 70 days. The sale price was not disclosed.

“Live Lobster has assured me that the company is committed to Maine, to Prospect Harbor and to building a state-of-the-art seafood processing facility,” said Gov. John Baldacci.

At one time there were dozens of sardine canneries along the Maine coast, putting out more than 300 million cans of sardines a year at their peak. But the number of canneries fell as consumption declined and foreign competition increased.

The Stinson plant that closed in April was the last full-scale sardine cannery in the U.S. A small cannery in California has been canning small numbers of sardines for a company in Monterey.

San Diego-based Bumble Bee, which bought the Stinson plant in 2004, said it had to close the facility because sharp cuts in the amount of herring that fishermen are allowed to catch in New England waters had made it difficult to get enough fish to pack as sardines.

Live Lobster is based in Chelsea, Mass., and operates several plants in Maine.

Company President Antonio Bussone said he fully expects to use the Stinson plant to its “maximum capabilities.”

The pending sale was welcomed in Prospect Harbor, which is part of the town of Gouldsboro. People have been waiting anxiously for someone to take over the plant and get people back to work in a region where jobs are scarce, said Selectman Dana Rice.

“If they plan to open the plant and create jobs, the town will stand behind them and get our people employed,” he said.