PORTLAND — A coin flip this morning may have ended a bidding war for the Ram Island Ledge Lighthouse at the entrance to Portland Harbor.

The two most recent top bidders, local real estate developer Art Girard and WIndham neurosurgeon Dr. Jeffrey Florman, met Thursday night to come up with a way to end their bidding war for the lighthouse, said Beth Bernard, an associate of Girard who said she attended the meeting.

The lighthouse is being sold by the federal government and there are strict rules on its preservation. The Coast Guard will continue to maintain the light itself and a foghorn on the wind- and wave-swept ledge.

On Thursday, Girard had the top bid of $175,000. Florman, who was bidding under the name of “abcdefg,” had the previous high bid of $170,000.

Bernard said the two tentatively agreed Thursday to settle the bidding between themselves with a coin flip, although Florman asked to consider that resolution overnight.

This morning, Bernard said, Florman told Girard he would go along with the coin flip and told the developer to go ahead and flip the coin in his office. Girard was so impressed by the doctor’s trust, Bernard said, that he rushed to Maine Medical Center to do the coin flip in person and shortly before 9 a.m., Florman chose “heads.”

Heads came up, Bernard said, so Girard agreed to drop out of the bidding. Florman, who apparently has changed his online bidding identification to “MAINE,” submitted a bid of $180,000 shortly after 9 a.m. Because of the timing of the bid, that means the auction will end Monday at 3 p.m. unless Florman’s bid is eclipsed.

Bernard said Girard reserved the right to re-enter the bidding if someone tops Florman.

The only other recent bidding has been by someone identified as “tugdocto,” whose last bid was $160,000 on Wednesday afternoon.

Both Florman and Girard said they don’t know the identity of “tugdocto” and insist their primary goal is to keep the lighthouse in Maine hands.