With gas pumps once again locked and in violation of environmental regulations, R.M. Packer Co. and the town of Edgartown have come to a short-term agreement to ensure fuel will be sold in Edgartown Harbor this summer.

On Tuesday, the town and Mr. Packer severed their 20-year lease that was set to expire on June 30, and replaced it with a two-year agreement that will allow Mr. Packer to provide fuel for this summer and the next. Secondary to the agreement, Mr. Packer has filed plans with the conservation commission stating that he will install two temporary gas tanks in place of the failed underground tanks.

“Those tanks are out of service right now,” town administrator James Hagerty said at the meeting, referring to the underground tanks. “What we are going to do is place tanks above ground for two summers, have that work happen and reassess the whole problem again.”

The issue came to the forefront last May, when numerous environmental violations caused the state Department of Environmental Protection (DEP) to shut down the North Wharf fueling station, which is owned by the town and leased to Ralph Packer, who owns the fueling equipment and the license to operate the pumps.

The gas pumps were unlocked by the DEP by mid-July, but during a routine inspection in October two underground tanks were once again found to have fallen out of compliance. Violations discovered in October included failure to respond to tank alarms and failure to have adequate leak protection, according to a seven-page Delivery Prohibition Order from the DEP. There were no fines attached to the violations.

“It’s the type of thing that could cause an issue of fuel product getting into the environment . . . there may be a breach on the inner component of the tank,” DEP press spokesman Edmund J. Colletta Jr. told the Gazette. “If it kept going in that direction, eventually there would be some sort of issue.”

The violations prohibited Mr. Packer from filling the fuel tanks, forcing him to remove them from service.

The temporary solution implemented Tuesday provides a two-year buffer for the town to either continue its agreement with Mr. Packer or find a new leaseholder for the fuel dock.

At a conservation meeting the previous week, Mr. Packer defended his company’s long record at North Wharf.

“We’ve been there, at North Wharf, since 1946, back in the dark ages,” Mr. Packer said. “And we have not had a spill reported from a boat or in the yard from delivery. That shows a pretty good record for our company.”

On Tuesday, Mr. Packer agreed to install two temporary above ground tanks, with one designated specifically for diesel fuel. The tanks will be placed behind a fence near the backside of the Prime Marina building on the wharf. He said he hoped they would be as unobtrusive as possible.

“You have such a precious harbor,” he said. “We don’t want to impose tanks that are unsightly.”

Mr. Hagerty said the temporary tanks have been purchased and are awaiting delivery and he is hopeful the tanks will be functional by May. Moorings in Edgartown harbor have already been booked through August, he added.

“We are in a better position this year than last year,” he said. “We need fuel.”