Rockville City Council member Douglas M. Duncan swept one-term Mayor Steven Van Grack out of office yesterday, 4,737 to 3,214, after an unusually acrimonious contest. "We had a real grass-roots campaign," Duncan told his campaign workers last night, "and it paid."

Swept into office along with Duncan was his entire nonpartisan slate, with City Council candidates James F. Coyle, Viola D. Hovsepian and David Robbins shutting out Van Grack slate members James C. Moone, Sima Osdoby and Andrew W. Johnson. Incumbent council member Steve Abrams was the only victor on the Van Grack slate.

Van Grack, a political newcomer and antidevelopment candidate in 1985 when he edged out two longtime office-holders, thanked about 130 supporters gathered at his headquarters last night for "a great effort," saying, "We have changed the direction of the city."

Said Coyle, the highest vote getter with 5,102 votes, "It's going to be great to have a mayor with integrity on the City Council."

Other winners in the Maryland suburbs last night were College Park City Council candidates Kristin McNamara and Sherrill Murray in that Prince George's County city's only contested elections.

In Takoma Park, James C. Douglas and Gregory V. Hamilton won the City Council slots in that city's only contests.

Rockville has three times the number of registered voters that it had two years ago, when 8,000 residents were eligible to vote. But only one-third of the nearly 24,000 voters turned out yesterday, election officials said.

Acknowledging the fractious nature of the campaign, Duncan said last night, "It's now time to pull together." He will be meeting with Van Grack supporters, he said, "because it's very important that they stay involved."

Van Grack told his supporters he was proud his administration had moved the Town Center development forward, and cited as a reform the end of dual voter registration with Montgomery County. He also noted his administration's plan to limit growth along Rockville Pike.

"I have loved being the mayor of Rockville," he told supporters. "I have loved working with all of you. It's been a great two years and we can look upon them with a great deal of pride. We ran the city of Rockville in a positive way, and that's the way we ran the campaign. The most important role we have to fill tomorrow is that of unifying the city."

The contest between Duncan, 32, and Van Grack, 39, had been widely considered the most bitter in recent history in a city that prides itself on its low key, nonpartisan campaigns.

Van Grack raised nearly $40,000 for his campaign -- unprecedented for a Rockville candidate -- for an office that pays $8,000 a year. Council member Duncan, who raised about $11,500 as of last week, strongly criticized Van Grack, calling on Rockville voters to reject the big-spending, professionally run political campaigns that Van Grack introduced to the city two years ago.

At debates and in his campaign literature, Duncan labeled Rockville as a city "at risk," claiming that Van Grack's policies and brash campaign style are out of step with the traditional small-town ways of Rockville politics. The post of mayor is partly ceremonial, with the job counting for one vote among five council members.

Van Grack, a partner in a Rockville law firm, and Duncan, a staff manager at AT&T, have increasingly sparred at meetings of the mayor and council. Despite sharing many of the same general views on the need to limit development, each has sought to portray the other as more progrowth.

During the past three months, Van Grack had encouraged speedy passage of a plan that would generally limit construction of new buildings on Rockville Pike to one-sixth the size currently allowed. Passage of the plan, which has been nearly five years in the making, would have been an election season plum for Van Grack. But Duncan, calling for additional public hearings, successfully delayed consideration of the plan until after the election.

Van Grack, who first attracted publicity in 1985 when he led his civic association's fight against a proposed commercial development, changed the face of Rockville politics later that year when he defeated the incumbent mayor, Viola Hovsepian, and longtime City Council member John Tyner II with a sophisticated, well-managed campaign.

In that race, Van Grack, as a political novice, raised a record $30,000 and hired his friend, pollster Keith Haller, to assist his campaign. And, in an attention-grabbing gimmick that many believe made the difference in the election, Van Grack jogged down Rockville Pike, a tactic that forced voters to take notice of both the traffic gridlock and an underdog candidacy. A week after the pike run, Van Grack won the election by 214 votes.

In a two-pronged attack, Duncan questioned the propriety of the large number of donations that Van Grack received from out of town, and contended that the incumbent would be compromised by developer interests -- from whom he received an estimated one-third of his campaign funds.

All of the City Council seats were up for election, with seven candidates running for four seats. All council candidates ran on slates with the mayoral candidates.Staff writers Chris Spolar, Sarah Tippit, Tracey Reeves and Michael Cannizzaro contributed to this report.