Hercules and a developer, after a year of on-again, off-again negotiations, agreed this week to a purchase-and-sale deal for a crucial piece of land that the city needs for a train station.

The train station, along with a ferry terminal and bus hub, would form an intermodal transit center at the heart of a transit village in combination with a private development of up to 1,392 homes, plus stores, offices and a boulevard of restaurants and shops, dubbed Hercules Bayfront.

The deal, which the council ratified unanimously to a standing round of applause from the spectators gallery, is the first step in a series of hurdles the project must vault in the near future, cautioned the project’s leaders — the city’s consultant, Charlie Long, and developer AndersonPacific LLC’s president, Jim Anderson.

Council and staff members were more effusive, even as they acknowledged challenges ahead. Vice Mayor John Delgado spoke of “keeping the dream alive,” one shared by new and longtime residents alike. Mayor Myrna de Vera hailed the deal as “a huge milestone.” Councilman Dan Romero called it “a new beginning.”

Councilman Gerard Boulanger said “the door is open to a very positive momentum” even as he predicted a five- to six-year-long process ahead.

Several praised Long, Anderson and Councilman William Wilkins, who is a real estate expert and who sat in on the negotiations. Wilkins, paraphrasing an ancient Chinese proverb, said, “The journey of 1,000 miles begins with the first step.”

The city will pay $2.38 million — $1.86 million cash in March, likely from the proceeds of surplus city property sales, plus $524,520 in developer impact fee credits when development actually happens — for 12.99 acres needed for the train station and access to it.

The cash portion is for the station site and part of a trail; the deferred portion is for infrastructure, including extension of John Muir Parkway. The city is supposed to pay $100,000 into escrow immediately.

Hercules also has tentatively agreed to augment by $600,000 the amount it will reimburse AndersonPacific for predevelopment expenses related to accommodating the transit center. AndersonPacific had sought $3.8 million; the city offered $1,775,000. The two sides settled on $2,375,000.

The celebratory mood at Tuesday’s council meeting briefly masked a pall that was cast with the announcement of the death of Brandon Paul Silva, the 20-year-old son of AndersonPacific team member William Silva. The young man died in a vehicle accident Sunday, officials said.

Later in the meeting, the council approved a consulting agreement with William Silva’s firm, d’Oro Construction Management, for $10,000 a month through February. Silva would replace Jesse Harder of HDR Engineering, who switched to another firm and will work out of the area.

The yearlong negotiation, conducted for the city by Charlie Long, first as interim city manager, then as a consultant, followed several years of largely fruitless negotiations between AndersonPacific and the city under former City Manager Nelson Oliva.

The council called a special meeting for 7:30 p.m. Thursday in case there needs to be minor wording changes to Tuesday’s agreement.

The other hurdles facing the project in the near future include action by the Hercules Planning Commission on land use approvals and a development agreement for Bayfront; council action on the land-use approvals and development agreement; and a second reading of an ordinance approving a development agreement.