The leaders of the anti-abortion movement in the Maryland House of Delegates and their fiercest opponents -- supporters of abortion funding -- gathered around a conference room table today and put the final touches on a pregnancy counseling program they all plan to support.

It was, Del. Timothy Maloney observed later, "like watching Begin and Sadat sit down at the same table."

At the center of the group was Del. Marilyn Goldwater (D-Montgomery), a proabortionist who has spent the last year laboring through 20 different drafts of legislation establishing the program. Around her were Maloney (D-Prince George's), Joan Pitkin (D-Prince George's) and Thomas B. Cuminskey (D-Cumberland), who oppose abortion and three other delegates who take the opposite stance.

"I feel like a juggler," Goldwater said as the group delicately picked its way through a last list of amendments to the program. "This has to be one of the most fragile coalitions I've ever worked with."

At the end of the day, however, the coalition was still there: 11 delegates in all, seven in favor of abortion and four against, sponsoring a bill that would give state grants to public and private groups maintaining pregnancy and parenthood programs for youths between the ages of 11 and 19.

The bill would mandate that all state pregnancy and pregnancy prevention services be coordinated through a new state board composed of representatives of various departments and that this board make the new program grants to groups that both opposed and favored abortions.

Already, according to Goldwater, the idea has the tentative support of Gov. Harry Hughes, who has indicated that he may include as much as $500,000 in a supplement to his budget for the program grants.

Whatever fate the measure finds in the legislature, however, Goldwater and her cosponsors believe they have already won the larger battle: they have brought the "pro" and "anti" forces off the streets and out of the State House corridors, removed their banners and buttons, and gotten them to agree on something.

"We all have reservations about parts of the bill," Goldwater said after the meeting. "And there may be groups from both sides who come in and oppose parts of it. But at least we did our arguing in a committee room. Our basic philosophy was that each group should not tell the other what to do."

"Let's face it," added Maloney, who had the job of selling the proposal to abortion opponents, "we haven't done it yet. But anytime you get these two groups together on an issue, you've already moved mountains.

The compromise was not reached easily. Although the proposed program does not encompass the issues of abortion and abortion funding directly, it brushes against them in several areas. Where it does, the precise legislative language in the bill has been the focus of months of careful negotiations.

In some cases, the bargaining has been over the slightest nuances. In one sentence, for example, Goldwater's draft referred to "unwanted" pregnancies by adolescents. Today, after an appeal from the antiabortion interests, who regard "unwanted" as a buzz word for abortion supporters, the word was changed to "untimely."

Other issues were much broader, Federal legislation mandating such programs, for example contains a provision requiring private groups that receive the counseling grants to provide abortion counseling, and the proabortion supporters would have liked to include this provision in the Maryland bill.

The antiabortion delegates, on the other hand, opened the bargaining by proposing that program money not be allocated to groups that help teenagers obtain abortions.

In the end, a middle ground was reached: the current bill does not discriminate against groups that provide abortion counseling, but contains a clause specifying that the new state board cannot allocate money that will be used to pay for the teen-agers' abortion operations.

So far, the delegates are not sure whether the organized groups on both sides of the issue will support the bill at its first hearing before a House committee this Friday.But one of the largest antiabortion groups, Maryland Right-to-Life, has decided at least not to oppose the measure, and the principal proabortion lobby. Planned Parenthood, has indicated that it will probably take a similar stance.

On both sides, the delegates and lobbyists say that they felt they had to work together because the abortion debates of years past have caused programs supporting alternatives to abortion or pregnancy counseling for teen-agers to be ignored. Meanwhile, tehre have been about 16,000 teen-age pregnancies in the state in each of the last two years.

"It seemed to me that no matter what your position on state funding for abortions, it's possible to be concerned about the problem of adolescents becoming pregnant and not getting the services they need," Goldwater said. "We may never agree on the larger issues, but it's essential that we get together on this."