Imminent closure of the Edgartown Marine harbor fuel dock because of fire safety violations was averted yesterday, but only after some urgent and at times comic shuttle diplomacy involving state and town officials and the fuel supplier R.M. Packer Company.

A spokesman for the state Department of Fire Services yesterday confirmed that the department is satisfied that steps are being taken by Packer to address a list of violations at the fuel dock ranging from an invalid permit to inoperable emergency fuel shutoff valves.

But earlier this week it looked as if the boat fuel dock, which Packer operates under contract to the town, could have been shut down just as the annual bass and bluefish derby was beginning, a situation Edgartown harbor master Charles Blair said would have been catastrophic.

The fuel operation was inspected by fire safety officers on August 6, who found five violations of state laws, detailed in a letter to the Edgartown selectmen this week. Among other things state officials found that Packer had no valid permit to dispense gasoline, that fuel tank sump covers were in poor repair and inaccessible, emergency shutoff valves were located under the wharf, access was not labeled, access openings were nailed shut and were missing handles and not operable.

All the defects were ordered fixed immediately, and the notice warned that failure to correct them could result in civil or criminal penalties.

But when selectmen summoned company owner Ralph Packer or his representative to appear at their Tuesday meeting to explain what was being done to address the problem, no one showed up.

After dealing with other business, board chairman Margaret Serpa called on Mr. Blair.

“Have you heard anything from anybody?” she asked.

“Not a word,” said Mr. Blair.

She noted for the record that the selectmen had called Mr. Packer in because the town had been unable to get any response on what was being done, or was going to be done, to fix the problems.

She suggested it could be necessary to get legal advice on what to do next, if there was no response from Mr. Packer, given that the town administrator, Pamela Dolby, had been told by the state authorities that the dock could be closed down immediately after Labor Day.

Mr. Blair said the two fire marshals who carried out the inspection had been reasonable. “They just need some corrections started,” he said.

The town bought Edgartown Marine ten years ago from Leonard Greene for $1.4 million and since then has contracted with Mr. Packer to operate the fuel dock.

At first, Mrs. Serpa was going to let the issue ride for another week, but selectman Arthur Smadbeck argued it could not wait.

The board agreed to continue the meeting at 10 a.m. Wednesday; meanwhile Mr. Packer was called again.

When the meeting reconvened, selectman Michael Donaroma detailed his own efforts to track down Mr. Packer.

Mr. Donaroma said he began calling Mr. Packer at 7 a.m. on his cell phone, to no avail. He then began calling the company office in Vineyard Haven, where he left messages. At 8:30 a.m. Mr. Donaroma said he went around to Mr. Packer’s office and peered in the window.

“I called once again and said, ‘Would you please inform Mr. Packer that I’m trying to get hold of him and I’m looking in the window at him.’

“So he came out.”

Mr. Donaroma reported that Mr. Packer then produced evidence of activity on the problems, including order forms and some contracts to supply materials for the repairs.

He said Mr. Packer estimated the work would be completed this fall.

Ms. Dolby said there was little more the town could do.

“It will just be up to the fire marshal; we have no control over what he decides to do or not do in this situation,” she said.

Yesterday, a spokeswoman for the department of fire services, Jennifer Mieth, said the agency had received a satisfactory plan to correct the violations. The defects did not present an imminent threat to public safety, she said.

Mr. Packer could not be reached for comment.