The Cyprus government has decided to arrest and try six Greek Cypriot right-wing extremists who allegedly were involved in the assassination of U.S. Ambassador Roger Davies, according to high Cypriot government officials.

Davies was assassinated during anti-American riots here after the Turkish invasion of the island nearly three years ago.

The arrests of the six members of the extremist EOKA-B faction were authorized today and are expected to be carried out Friday, the sources said.

The long-delayed prosecution, on which President Makarios was certainly consulted by his Cabinet ministers, is seen here as largely a political decision - a sign of Makarios' effort to improve his government's image with the new Carter administration, which has designated former Defense Secretary Clark Clifford as a mediator for Cyprus.

Although the identities of some of the assassins were suspected from the time of Davies' death, the Cypriot government moved effectively only after successive American administrations showed sustained concern about the crime. The Makarios government has recently expressed hope of gaining help from Washington in reaching a settlement of the Cyprus problem.

U.S. embassy security officers were invited to follow up firsthand the Cypriot detective work. When the investigation was reopened last year, television newsfilm was enlarged and scrutinized for leads. The killers used a riot outside the U.S. embassy, which was covered by local and foreign media, as a cover for their attack.

Three defendants, who police say were identified firing automatic weapons, including a machine gun, into Davies' office, are to be charged with manslaughter. In Cyprus this carries a maximum punishment of life imprisonment, usually reduced in sentencing to 15 years or less.

The remaining three, allegedly firing at other parts of the building, face charges of illegal use of firearms, punishable with up to 15 years in prison and less in practice.

The case against a seventh suspect was not reviewed because he has left Cyprus. The six men's whereabouts here are known: one, a policeman, is in jail for an unrelated conviction.

The six gunmen belong to EOKA-B, an armed underground right-wing movement that supports enosis, union of Cyprus with Greece.

Self-proclaimed heirs of Gen. George Grivas, the famed guerrilla fighter for Cypriot independence, EOKA-B activists, with close links with the now-deposed Greek junta were the Cypriot core of the anti-Makarios, pro-Athens coup here in 1974. The coup triggered the Turkish invasion and partition of the island.

Angered at the American failure to prevent the Turkish invasion, EOKA-B fanatics, some in police uniforms, took advantage of a leftist Cypriot demonstration against the embassy to take positions in surrounding buildings and then fire automatic weapons into the ambassador's office and his top-story study.

Nearly a hundred bullets ripped into the I-shaped office from the two angles. Davies was killed as was his Greek Cypriot secretary, who came to his assistance. The office windows, later plated with steel panels for protection, still have holes around them from the bullets.

The actual murder weapon has not been traced. But apparently, men who could be shown on film to have fired into the ambassador's office could be found guilty of manslaughter under Cypriot law. The fire from two angles into the ambassador's two most likely whereabouts is cited as evidence of a plot.

Other Greek Cypriot members of EOKA-B have been linked to an assassination attempt in the United States on Turkish leader Bulent Ecevit, premier during the invasion. They have also been linked, more tenuously, to the assassination in Athens of Richard Welch, American CIA station chief, who had served in Cyprus, and the murder of a Greek junta police officer.

EOKA-B members contend that their leaders mounted the ill-fated coup here in collusion with U.S. intelligence officials who then, the story runs among EOKA-B followers, betrayed the Greek Cypriots by backing the Turkish invasion and the partition of Cyprus. American diplomats deny the collusion, but acknowledge that many EOKA-B members believe it.

The decision to prosecute the six is the latest step in a growing campaign here by the Greek Cypriot authorities against EOKA-B, which would be an embarrassment and perhaps even a threat in any foreseeable settlement with the Turkish Cypriots.