Hard-line officers with close links to this country's extreme right have been given key posts in the first major shake-up in the Salvadoran military since a mutinous group of officers forced the resignation of Gen. Jose Guillermo Garcia as defense minister six weeks ago.

Garcia had been accused of cronyism and incompetence and some of the 10 changes announced today may be intended to increase the efficiency of certain lackluster brigades. The government faces the beginning of what leftist guerrillas have promised will be a major new offensive.

But other changes, coming as Washington appears intent on hardening its ideological posture here, mark a major victory for right-wing forces in the armed forces that are now presided over by the new defense minister, Gen. Carlos Eugenio Vides Casanova, the former head of the National Guard. Garcia, often backed by outgoing U.S. Ambassador Deane R. Hinton, had worked to exclude some of the newly named chiefs from important and politically sensitive positions in the institution that traditionally determines this country's political course.

The most important change today, with the most complex ramifications in the Salvadoran armed forces' byzantine intramural conflicts, is the replacement of Col. Francisco Moran by Col. Nicolas Carranza as head of the Treasury Police.

The smallest and most secretive of the three Salvadoran security forces (the others being the National Guard and the National Police), the Treasury Police is known as the most ruthless intelligence-gathering institution in the country. Even in a nation where such a function historically is associated with torture and the threat of murder, members of the Treasury Police repeatedly have been identified by human rights organizations, U.S. officials and ranking civilian members of the Salvadoran government as particularly brutal.

According to one senior Salvadoran official who is generally well informed about internal military affairs, a group of officers under Moran has provided what amounts to a "death squad" service to whoever pays them. Some of these same Treasury Police are also reputed to have been vital protectors of right-wing leader Roberto D'Aubuisson when civilians in the government accused him of leading assassination teams in 1980 and 1981.

Moran was criticized by his fellow officers less for this than because they regarded him as a staunch Garcia crony who held his position as a result of personal ties rather than professional qualifications.

During the first two years after the reformist coup of 1979 promised to reduce human rights abuses, the Christian Democrats then in the government tried to remove the senior military officers most associated with the killing and torture of civilians. Moran was one of the two most openly criticized. But the other was Carranza, who has been named to succeed him.

As deputy secretary of defense until December 1980, Carranza repeatedly was accused of covering up for the military's most ruthless elements while at the same time forging a close alliance with D'Aubuisson, who attempted several coups during that period. Carranza eventually was put in a less dangerous post as head of the national telecommunications system.

In the months after D'Aubuisson was made constituent assembly president in last year's election, he worked to have Carranza replace Garcia as defense minister. That move was thwarted by the combined efforts of Garcia, interim president Alvaro Magana and Ambassador Hinton, according to senior Salvadoran officials.

Another appointment announced today reflecting the resurgence of right-wing power is the naming of Lt. Col. Mario Denis Moran (no relation to Francisco) to head the Zacatecoluca regional command. His bodyguard was implicated in the murder of two American agrarian reform advisers.