The young and outspoken mayor of Hamburg, Germany's largest city west of Berlin, is emerging as the central figure in a divisive national debate that is testing the dimensions of this country's postwar democracy.

The mayor is Hans-Ulrich Klose, 41, a liberal and controversial Social Democrat.The debate is over the socalled "radicals decree," a 1972 resolution adopted by federal and state governments in the wake of terrorist violence, a measure designed to keep extremists out of West Germany's vast system of public service jobs.

The fear in Germany at the time was that terrorists, once thwarted by the police, would begin what they called the "long march through the institutions" in an effort to subvert the system from within.

In the years since then, the decree and its haphazard application have left scars on many West Germans, especially the young. The federal government virtually has dropped the decree as a discredited approach, but many of the states governed by the conservative opposition have not.

So the debate goes on, stirring deep divisions among those who feel the threat of subversion -- especially of the school system by Communist teachers -- is real and those, like Klose, who believe the cure is worse than the disease.

"I don't like extremists either," Klose said in an interview in his office here recently. "I consider them to be my political adversaries, Communists as well as neo-Nazis. But I think we are making a mistake when we try and solve the problem by means of administration. The struggle between democrats and nondemocrats must be a political struggle in the first instance. We must get used to the fact that a democracy must be a democracy even in the way it handles people who are nondemocratic."

Although official statistics have not been available since 1976, it is estimated that since 1972, 1.5 million West Germans applying for public sector jobs have been investigated by the Federal Office for the Protection of the Constitution, the equivalent of the FBI.

The catch has been meager, with about 1,000 to 2,000 applicants rejected because they failed to meet the test of loyalty to the constitution and to the "free democratic order."

The effect of these security screenings, the fear of stepping out of line politically or in student activities, has had a much broader impact, however, than the number rejected indicates, especially since the German federal and state civil service includes everything from garbage collectors to teachers and government officials.

"My experience in the last six years is that the procedure in handing the problem has gone out of control," Klose said. "It became too perfect in the way that Germans are. When we do things, we do it in a perfect way, be it good or evil."

"It is a question of faith and legitimacy," he said. "When young people start to be afraid of the state and its mechanisms they get a feeling that everybody is under some kind of control. So they start to nold back when asked for their political opinion or convictions," a reluctance that produces conformity and opportunism, he said.

"In general elections, extremist parties of the left and right get between 1 and 3 percent of the national vote," he added. "Yet the whole country is running crazy because of this 1 to 3 percent and my fear is that by handling the situation this way we will actually increase the number of potential voters for extremist parties."

Klose is not the only West German politicain to hold such views Yet he is the most important one for several reasons.

For one thing, very few if any other front-line politicians here, including Chancellor Helmut Schmidt, are personally confronting the issue, although the government and the ruling Social Democratic Party are clearly on record as favoring measures to liberalize the system significantly.

"Schmidt is the best chancellor we could have on financial and economic matters today," said a top Social Democratic Party political figure. That is important because it is under severe economic strain that West Germany would be most vulnerable socially if things went bad, many here believe. "And Schmidt has a feeling for social conflicts between trade unions and entrepreneurs. But he is not a man of internal politics and does not understand that emotional-moral questions are of great political importance too. He would never be a driving force on such an issue, although he now accepts the decision of the party on this issue," he said.

Klose, on the other hand, has fought a politically costly battle in the Hamburg parliament to prevent two school teachers with 12 years' experience from being fired because they are Communist Party members. He warned his party and conutrymen in October that it was better to have 20 Communists in public service than 200,000 frightened and intimidated young people in the country.

Yet the most important thing about Klose may be his age. His biggest appeal is to younger people and he is well known nationally. Thus he is emerging as a future national leader who may have a built-in constituency to carry him and his view of German democracy well beyond the bustlincity-state of Hamburg with its 1.7 million inhabitants.

Although Klose favors doing away with the radicals decree, he is against giving civil service jobs to "anybody who acts or speaks in precise and proven terms against the basic principles of our democratic order, people who advocate violence or who go into schools to convince students to act against democratic principles.

"You cannot work on the basis of suspicion alone. Membership in a communist party, for example, is not sufficient proof" of such intentions of upheaval, Klose argues.

Yet virtually the entire conservative Christian Democrat and Christian Social Union parties, and indeed a number of Social Democrats, believe it is fundamentally contradictory to be a Communist and swear allegiance to West Germany's constitution.

In 1976, the federal government and the states that are ruled by the same coalition adopted more lenient guidelines, putting more of the burden of proof on the state and claiming that membership in an extremist party by itself was not sufficient grounds for rejection.

In January, the federal government went an important step further ruling that the routine security checks would be dropped and undertaken only when there are tangible indications that a candidate would not meet constitutional criteria. The move represented one more attempt by Bonn to provide national guidelines.

Yet that will not be the case. Opposition leader Helmut Kohl already characterized the new guidelines as "a capitulation" to the enemies of democracy. Three conservative-ruled states said they will not comply with the federal guidelines in their own hiring procedures and two others may join them. West Germany's 10 states enjoy considerable autonomy.

"So the problem is not solved yet," Klose said. He said he believed, however, that if at least the Social Democrats in a few years are rid of the decree as an internal issue and the country "remains free" then perhaps the Christian Democrats will also reconsider their position.

"After all, why do we, the Germans have such a big discussion on such a question?" he asked. "Why don't you, or the Swedes, or French, or Dutch, or Belgians? Why we?"