A chain-link fence along the Earhart Boulevard train tracks can stay but the barbed wire on top must go under an agreement worked out between the city of New Orleans and Amtrak, which had been at odds over the barrier since September.

The fence will be 9 feet high, 2 feet taller than originally proposed.

The fence that has been under construction is 7 feet tall, with an additional foot of barbed wire on top. The taller fence won’t need barbed wire, Amtrak said in a statement Tuesday.

Amtrak has said the fence is a necessary security barrier to protect the train tracks against trespassing and other violations. But Mayor Mitch Landrieu’s administration and the City Council argued it would impede growth in the surrounding neighborhood.

Councilwoman Stacy Head has called the barrier “prisonlike.”

Amtrak began erecting the fence in the summer. It was nearly finished when the City Council intervened on Sept. 18, passing a unanimous motion barring the building of “any barrier or other obstruction” within 15 feet of the tracks between South Lopez Street and South Broad Street.

A day later, the Department of Safety and Permits issued a stop-work order that city officials claim Amtrak then disregarded “in violation of law.”

The city filed suit against the National Railroad Passenger Corp., which operates Amtrak, in Civil District Court in October, requesting a temporary restraining order and injunctions against the fence.

The city said the project was in violation of Amtrak’s lease, which requires the company to “comply promptly with all applicable federal, Louisiana and local laws.”

Landrieu and council members expressed concern that the fence would interrupt the growth of the Earhart Boulevard corridor, which for years was the victim of neglect and disinvestment but now is home to Restaurant Depot, the corporate headquarters of Bridge House, the Sucré bakery, Woodward Design + Build and several other businesses.

Amtrak filed a countersuit in U.S. District Court accusing the city of breach of contract. It cited a federal statute that it said affords Amtrak control of “all aspects of the rail passenger transportation it provides.”

Both suits will be dismissed, said Marc Magliari, a spokesman for Amtrak.

The city did not respond to a request for comment on the agreement.