The Prince George's County Council unanimously adopted a bill yesterday that would make it the first major jurisdiction in Maryland and in the Washington area to require automatic fire-sprinkler systems to be installed in all new commercial and residential buildings, including single-family houses.

The regulations will be phased in over four years, affecting new hotels, motels and dormitories by next July, town houses by December 1989, and houses by Dec. 31, 1991.

The installation of the systems would add about $1,700 to the cost of a new house, county government officials and home builders said. The actual cost to install the system would be about $3,000, but the net cost would be reduced by easing other building safety standards.

The bill now goes to County Executive Parris Glendening, who has indicated he will sign it into law.

The vote came on the final day of the 1987 legislative session as council members rushed to decide 29 bills, ranging from a charter amendment to change the way council members are elected to a proposal to trade increased density for developers' commitment to construct on-site day care centers. After a recess of seven working days, the council will return Dec. 1.

In what was seen as a defeat for developers and the black community, the council rejected, 7 to 2, a bill to place on the 1988 ballot a charter amendment to allow four of the nine council members to be elected at-large. One of the four seats would be held by the council chairman for four years. The two black council members, Floyd E. Wilson Jr., who sponsored the bill, and Chairman Hilda R. Pemberton voted for the legislation.

Council members voted down the proposal amid concerns that the cost of running a council race would escalate if developers and big business joined to back the at-large candidates. The proposal was supported at a public hearing yesterday by several large developers and by the Prince George's Chamber of Commerce.

"The proposal represents a return to the political bossism of Prince George's County," said council Vice Chairman James M. Herl.

Council members have been elected by districts since 1982, when a coalition of civil rights groups and civic activists led a referendum campaign to change the at-large system as a way to end Democratic machine control over elections.

Wilson said the change is necessary to end "parochialism" on the council, particularly in zoning cases.

The move was also seen as an attempt to increase the number of blacks elected to the council, because blacks can comprise a majority of the voters in a Democratic primary.