The Prince George's County Council, in a relatively restrained ending to a stormy four-year term, narrowly passed a law yesterday to bring the county's ethics code in line with a model developed by the state.

Council members, a majority of whom are leaving office, passed a hastily prepared version of a model law written by the State Ethics Commission, with some complaining loudly of being pressured by state officials they described as "pompous" and "dictatorial."

"As far as I am concerned, I am ready to tell them to stick it in their ear," said William Amonett, one of only four incumbents who will return to the council. Amonett argued that the state board, which threatened the county with a lawsuit if it failed to comply, had not reviewed the county's code in a timely fashion. Because of that, said Amonett, and because the county already has its own version of an ethics code in place, the state had no right to expect the county to rush through a review of the complicated bill.

The new law, first presented to the council Oct. 13, describes a code of behavior for elected officials and county employes, establishes requirements for financial disclosure and defines and sets forth regulations for lobbyists.

The measure was required by a 1980 state law, which specified that all county codes had to conform with state standards by last July. Prince George's attorneys had argued that a 10-year-old local law was substantially sufficient.

Despite occasionally heated discussion over the ethics bill, yesterday's session was a far cry from the emotional confrontations this council sometimes had over the last four years as it drew new council district lines, rejected a proposal to lease the county's hospital system, awarded tax relief to the Washington Capitals hockey team, selected a new police chief and engaged in pitched battles with the outgoing Republican county executive, Lawrence J. Hogan.

This time last year, the council was in the midst of awarding controversial cable television franchises to two politically well-connected groups against the recommendations of a consultant and citizen review board. When Hogan vetoed the council's choice, the council narrowly overrode the veto minutes before 5 p.m., with two council members pulling anxiously on the arm of the one holdout.

Yesterday's session contained only a hint of past conflicts, as Councilwoman Ann Lombardi tried to persuade her colleagues to consider the "political consequences" of being the last Maryland county to bring its ethics code into compliance.

"I think you're taking an extraordinary step by having Prince George's hanging out, being the only one that's going to handle this in our own secret way," she said.

"Oh, for God's sake," laughed Frank Casula, whose folksy, blunt manner had frequently clashed with Lombardi's meticulous, cautious approach. "God forbid. Gimme a break."

A 6-to-4 majority approved the bill, three of the four opponents being returning council members. In other action, the council voted to give the county's health officer power to spend county funds in the event of a rabies outbreak. The meeting ended barely two hours after it began, and the retiring members strolled upstairs for punch and homemade cake.