It's been a roller coaster life for the Baltimore Harbor.

For more than a decade, members of Congress from Maryland have labored to secure federal money to dredge the harbor deep enough for large coal carriers to use. But each carefully laid scheme has fallen apart, often at the 11th hour.

And each time, Maryland's representatives and senators have heaved sighs of frustration and started over.

Until last week.

Sen. Charles McC. Mathias (R-Md.), a veteran of the long-running battle, says the fight has finally been won, a belief echoed by his Maryland colleagues.

Last week before Congress adjourned, the House and Senate passed a supplemental appropriations bill that included money for the Baltimore dredging project. Congress froze the appropriation until next May 15, to give itself time to pass cost-sharing legislation. But members of the Maryland delegation are confident that dredging will be under way by late spring.

"There's always a chance that something can happen. But we're hopeful there are no more legislative loopholes," said James C. Abbott, a spokesman for Rep. Barbara Mikulski (D-Md.). "We're not anticipating any kind of legislative maneuvering."

Maryland representatives are always quick to point out that there is little opposition to the Baltimore Harbor dredging project; rather the project is caught up in a larger dispute in Congress over water projects.

The problem: Congress has been unable for years to resolve the question of how much of the cost of water projects should be borne by the federal government, state governments and local beneficiaries such as shipping companies.

This dispute has put on hold dozens of water projects across the country -- flood control structures, new locks and dams, hydroelectric facilities, irrigation canals and other dredging projects.

State and local officials who want these projects begged Congress to appropriate the money and let the localities work out their own cost-sharing agreements with the Army Corps of Engineers.

That's what the appropriations committees decided to do this summer. The end-of-the-year appropriation spending bill included millions of dollars in start-up money for more than three dozen projects, including the Baltimore Harbor.

But the House Public Works Committee, which has jurisdiction over the cost-sharing issue, protested last week that the Appropriations Committee was bypassing it. The House then passed a Public Works Committee amendment that would have prevented the money from being spent until Congress agreed to a cost-sharing plan.

Maryland representatives greeted the news with long faces. Rep. Roy Dyson, a Democrat from Maryland's Eastern Shore, declared: "Things are back to the beginning. It looks pretty bad for Maryland."

Representatives feared that the wait for a formula could be a long one, because the cost-sharing bills passed by the House and Senate committees differ in some key areas. The Senate bill proposes less federal spending and more local cost sharing.

Within 24 hours, however, a compromise had been worked out so the Corps of Engineers will have to wait only until May 15 for Congress to approve a cost-sharing formula. If the deadline is not met, the Corps can distribute the money based on agreements with localities.

If cost-sharing legislation is passed before May 15, the money can be released much sooner. Congress included $48 million in the 1985 supplemental appropriations bill, and named 41 projects that would be eligible for the money.

Mikulski said she was disappointed in the delay, but Rep. Helen Bentley (R-Md.) said, "It's not fatal. We know it's going to happen."