Frances L. Cox, the strong-willed and once politically powerful woman who was treasurer of Fairfax City for 27 years, was convicted yesterday of misappropriating public funds and sentenced to six months in prison, 300 hours of community service and two years of probation.

An additional 9 1/2-year prison term was suspended by Fairfax Circuit Judge Barbara M. Keenan as part of a plea-bargain agreement worked out between Cox's attorneys and special prosecutor Steven A. Merril.

Under the unusual agreement, Cox, 57, pleaded not guilty to taking city funds, but her attorneys agreed that evidence presented at yesterday's trial was sufficient to convict her beyond a reasonable doubt, and they presented no evidence of their own.

Cox, who for nearly three decades all but ruled Fairfax City from the treasurer's office, was convicted in September 1982 of embezzling from the city and sentenced to 10 years in prison, but that conviction was overturned.

At Cox's first trial, Merril said she had taken "a minimum" of $200,000 in cash from the city and used it to support an extravagant life style described during her first trial as including expensive clothes, cars, furs, French food and four-hour excursions to the beauty parlor.

The reversal of the original conviction came last April when the Virginia Supreme Court ruled that Cox had not had access to all the financial and bank records she needed to prepare her defense.

Merril, who also prosecuted the original case, yesterday declared himself satisfied with the fresh conviction and sentence.

He said the Supreme Court decision voiding Cox's conviction was "mistaken" and "very unclear," granting her the right to irrelevant and probably nonexistent bank records. He said the breadth of that decision also made it possible that the case might not have gotten to trial again.

Cox's attorney, Grayson P. Hanes, said years of litigation had eroded Cox's financial and emotional resources and she did not wish to face the prospect of years of additional litigation if she declined to accept the plea agreement. "A number of things have happened in the last few years, and there comes a point where she just wanted to get this thing behind her," he said.

Yesterday's sentence dismayed and angered some former and current Fairfax City officials.

"Isn't that nice?" asked former mayor Frederick Silverthorne sarcastically when told of the sentence. "I think it's a travesty of justice." Silverthorne was mayor at the time the city first investigated Cox and the state indicted her.

"It's practically no sentence at all," said another ex-mayor, John Russell, who was in office when Cox was convicted the first time. "If I were in her shoes, I would be overjoyed with that type of sentence . . . I supsect it's not going to sit very well with an awful lot of people."

But others, particularly the current generation of city officials that has taken over since Cox was ousted, said they hoped her conviction would finally enable the city to put behind it an episode that has distracted it for nearly three years.

"The important thing is that the case is now finally closed," said the current mayor, George Snyder.

Cox, who has steadfastly maintained her innocence, stood erect and composed at the conclusion of yesterday's 40-minute trial.

Asked by Keenan whether she had anything to say before the sentence was imposed, Cox replied, "No, thank you." She waved to friends in the courtroom as she was taken to the Fairfax County Adult Detention Center, where she will probably be held for the length of her term.

Cox spent eight days in jail after her last conviction, and, with time off for good behavior, she should be out of the Fairfax jail in four months, officials said yesterday.

During her first trial and yesterday's hearing, Merril described a simple method he said Cox used to take funds that, combined with haphazard or nonexistent financial records, enabled her to take money over years without being discovered.

It was not until Cox was defeated in her bid for election to a fifth term in 1981 and a new treasurer took over that an investigation was launched.

As described in court yesterday by the city's former deputy police chief, Samuel S. Ellis, Cox pocketed cash that came to the city in over-the-counter payments for license and other fees and accounted for the receipts by substituting mailed-in property tax checks for which no separate records existed.

At her first trial, Cox's attorneys argued that city records were "chaotic," the treasurer's office mismanaged and Cox may have been incompetent. But they maintained she did not take any city funds.

The city eventually recovered $160,000 from the insurance company that bonded Cox, and it recently dropped a $2.3 million lawsuit against her when it determined that she had no assets to seize. Ellis said previously she spent the money she took almost immediately.

Merril said he repeatedly offered to drop the charge against Cox "if they could just sit down tell me where the money went. They couldn't. . . . Anybody who doesn't believe she's guilty is living in a dream world or just doesn't want to listen to the facts."