They came from two New England cities to Montgomery County within 14 months of one another, both bringing with them professional reputations for achievement-and controversy. The two men were to preside over an era of change, heading the most visible government departments in one of the nation's wealthiest counties.

But somewhere along the way things turned sour for former Police Chief Robert J. diGrazia, who was fired Dec. 7, and School Superintendent Charles M. Bernardo, who is tenaciously holding on to his own post in the face of a new and hostile school board majority.

The lingering question now being asked in the county is whether diGrazia and Bernardo brought their problems on themselves or whether the tasks they were asked to do were so unpopular that no one could have been more successful.

Then there is the added factor of the unique political climate of Montgomery County, where citizens demand an extraordinary say in the workings of government.

For all the differences in the two men's situations-and in their personalities-their problems had very similar origins: both came into their jobs with great plans for change and both failed to win the allegiance of many of their employes.

"it's always hard, when you think you're good, to agree that changes might be made," said one school system observer, pointing out that both the 750-member police force and the 12,000-person school bureaucracy "had a reputation for excellence."

In addition, the two men's style of management seemed to do little to break down the natural resistance to change. DiGrazia, flamboyant and media-conscious, said he wanted his men to be "social workers with a gun" and frequently said that most police officers didn't have adequate training to do their jobs.

Far from flamboyant, Bernardo was a distant figure, impeccably dressed and almost always aloof both from the media and from his own staff. When it came time to make major decisions about reorganizations or academic programs, one observer said, Bernardo closeted himself away with a small inner circle of advisors.

And while diGrazia built some public following during his tenure-calls to the county adminstration ran 2-to-1 in his favor after his dismissal-Bernardo's apparent aloofness and his admitted tendence to lapse into jargon alienated many of the county's parents.

One expert on public administration, Harvard professor James Q. Wilson, reasons that problems like that are almost built into the situation.

A roving urban manager like Bernardo or DiGrazia, he said, is usually "restless to begin with, a skeptical person who is very ambitious and who is critical of the system they're in.

"they fit into the role of the bull in a china shop," he added."

It was not as if Bernardo and diGrazia had never faced controversy before. DoGrazia was consistently embroiled in Boston's political wars, angering such powerful people as Mayor Kevin White. And Bernardo became the lightning rod for a lot of resentment when, as school superintendent, he integrated the school system in Providence, R.I.

According to some observers, the two men's high visibility contibuted to their appeal. Many local officials, in their quest to find reformers who can make quick improvements in a particular agency, will seek someone with a reputation for reform and innovation in an outside community, Wilson said.

"but they'll forget that if the person was good at shaking things up in other communities, well they're going to do a lot of shaking up in the next community as well."

Bernardo came in thinking he could do everything now," said Hank Heller, president of the Montgomery County Education Association, the teachers' bargaining agent, and one of Bernardo's staunchest critics.

Much the same has been said about diGrazia.

But in his zest to institute his policies swiftly, diGrazia seemed "to go to the nth degree to antagonize," said retired county executive James P. Gleason, the man who hired diGrazia in 1976.

Bernardo's problems started about two years ago after a relatively benign first year. It was during that period that he began closing schools with declining enrollments.

He was accused of making decisions too much in isolation, which angered parents. But one of his most unpopular moves was his massive reorganization of the county's academic bureaucracy.

The plan eliminated some jobs and reshuffled certain employes into less prestigious posts. The way Bernardo drew up the plan provoked both criticism and resentment from scores of teachers and administrators.

"the board and the superintendent met secretively," said one school official. "then the superintendent met secretively with a small number of advisers. It wasn't that what he recommended was so bad, but there was no opportunity for input until the plan was cast in cement."

Thus Bernardo's every move - his efforts to achieve a better racial balance in the schools, his hiring of outside consultants and his introduction of a mandatory black studies course for school employes - became a springboard for criticism of the superintendent.

And now, a bitterly divided school board has joined the teacher's association in a court suit to try to invalidate the superintendent's four-year contract, which was just renewed last year.

Almost from the minute he set foot in Montgomery County, Robert diGrazia's administration was clouded in controversy. He was the first chief who was not a "home-grown tomato," an officer who rose up from the department's own ranks. Instead, diGrazia was one of a handful of roving police chiefs, who move from jurisdiction to jurisdiction as police "reformers."

Many officers believed then that their chief was just using their department as a stepping stone to a federal appointment in Washington-a rumor that diGrazia repeatedly denied.

In addition, he brought with him his own aide, Philip H. Marks, a civilian whose power as the chief's closest adviser was widely resented among the sworn officers. This same resentment was reinforced last spring when diGrazia appointed a woman civilian to head the police training academy.

Added to that was the steamroller approach the robust, domineering chief often used to communicate his philosophy on policing to the troops.

When he announced he was appealing his firing, diGrazia said, "I brought innovative programs to the county in the areas of crime prevention, service to the elderly and drug control in the schools.. I have been open and candid-speaking with hundreds of private citizens and citizen groups and listening to their concerns."

DiGrazia had the right objectives, former county executive Gleason said recently in an interview, but "he has some problems, constitutionally, just communicating" what he was all about to his officers.

Bernardo, meanwhile, continues to express confidence in the face of his present crisis. "in Providence I went around town in a bullet-proof car and had an armed police escort during the integration of the schools," he said. "this is simply another challenge."

For many votes, the Nov. 7 school board election are, in fact, a referendum on Charles Bernardo-and the election of the first conservative school board in 15 years represents a general backlash against Bernardo's policies, methods and style.

"the people were finally able to show what they feel after three years of sociological jargon," said one PTA head.

The 21 school closings that have occurred during Bernardo's tenure-Closings that were brought on by declining enrollments and budget constraints-alienated thousands of parents. In many ways this was evident during a public hearing last week. A large group of Wheaton area parents, wearing bright red and yellow W'son their lapels, listened skeptically as Bernardo and several staffers explained why Wheaton High School's roof was not on the list of proposed school system repairs.

"wheaton," Bernardo said, in classically slow and measured terms, "might possibly be a candidate for closure in the future. Therefore, we are not entirely certain that we should invest in an improvement there if indeed the board decides to close at some future date."

"Let me assure you that the roof would be repaired in all due haste if indeed the lives of students were in danger," Bernardo said, shortly thereafter, following questioning by several board members.

"well golly gee, bully for you," one Wheaton parent sarcastically bellowed from the back row, as countless others shook their heads in disguest.

Interestingly, Bernardo's primary support lies in the county's black community, which fervently supports his policies toward minorities.

But many black parents and community leaders are becoming increasingly disturbed by the current conservative makeup of the board because they feel it can only end up in a total undoing of Bernardo's effort to increase understanding between minorities and the test of the community.