After 5 1/2 hours of haggling, the D.C. City Council tentatively agreed last night to add $3.9 million to the $237 million budget recommended by Mayor Marion Barry for the city's public schools in the fiscal year that begins next Oct. 1.

The action came as the council voted preliminary approval of a city budget that is $4.9 million higher than the $1.4 million budget that the mayor sent to the council a month ago.

To help pay for the increase in the schools budget, the council agreed to impose new property taxes on a number of national organizations that currently enjoy tax exempt status granted by Congress.

There are about 44 such organizations headquartered here, and about half of them would retain property tax exemptions under local laws. Council member John A. Wilson (D-Ward 2) said that the taxes on the remaining organizations, if allowed by Congress, would generate about $2.5 million in additional revenue.

Among the organizations likely to lose tax exempt status under the proposed bill would be The Daughters of the American Revolution, The Red Cross, B'nari B'rith, The National Geographic Society. The American Legion and The Veterans of Foreign Wars, city officials said.

The council also voted to levy new taxes on interstate buses entering the city and on the recording of deeds submitted by developers who put up land as collateral for construction loans.

The council is scheduled to take final action on the budget Tuesday.

Before finally agreeing on the $3.9 million figure, council members spent most of the evening searching for ways to add as much as $13 million to the schools budget. They voted down proposed increases in taxes on cigarettes, gasoline and insurance premiums. They also voted down a proposal for a city lottery, an idea opposed by many influential clergymen here.

At one point council member John Ray (D-At-Large) proposed -- and then withdrew -- a motion for a 6 per cent increase in the city's real property taxes.

"I think the council has acted as much as it could for the schools," Council Chairman Arrington Dixton said after the meeting.

The council voted to increase the school's budget after the mayor proposed spending about $4 million less for schools in the coming fiscal year than will be spent in the current fiscal year.

Barry said the reduction was justified by the continuing decline in student enrollment in the schools.