Against long odds and the way government traditionally operates, a bill to halt funding of the Baltimore subway has come within one roll call of passage by the Senate.

The stage for the showdown vote, probably later this week, was set Monday night when the bill by Sen. Frederick Malkus (D-Dorchester) received preliminary approval.

Senators on both sides of the controversial issue say the final vote will be close.

Malkus' bill was one of the earliest filed for the 1979 session and until last week appeared to be one of the year's longest shot bets.

It seeks to reverse the course of the subway, the single most expensive public works project ever authorized by the General Assembly. Its first phase is budgeted at $750 million, 90 percent of which is supposed to be paid by the federal government.

The bill was rejected by the Budget and Taxation Committee, but Malkus surprised the State House last week by getting 23 of his 46 colleagues to agree to bring it to the floor anyway.

Monday night he gathered an even greater margin - 31-to-10 against amendment of one of the Senate's most savvy members, Harry McGuirk (D-Baltimore).

Joining Malkus in the attempt are most of the small county senators who fought a losing battle against Gov. Marvin Mandel in 1976 trying to stop the authorization of the project.

Opponents claim the subway, which has cost $65 million so far is state funds, is diverting much-needed money from highway projects around the state. Highway construction is budgeted at $85 million this year.