A federal judge permanently blocked Alabama yesterday from prosecuting a one-time FBI informant, Gary Thomas Rowe, in the 1965 slaying of civil rights worker Viola Liuzzo.

Rowe was indicted in September 1978 on a first-degree murder charge in the slaying of the Detroit housewife after the voting rights march from Selma to Montgomery.

But U.S. District Court Judge Robert Varner ruled yesterday that Rowe could not be tried in the 15-year-old case. Last summer the judge temporarily blocked an extradition order that would have required Rowe to return to Alabama to stand trial.

Contacted at his home in Savannah, Ga., Rowe said the judge's order means "justice has been done. That's the truth. I thank God for that."

At a hearing last summer, Rowe's attorneys argued their client's right to a speedy trial would have been violated if he were prosecuted for the 15-year-old murder.They also argued that Alabama authorities had acted in bad faith in a ttempting in exchange for his testimony against three Ku Klux Klansmen originally charged in the case.

Rowe was the key government witness when the three Klansmen were convicted in 1965 on federal charges of violating Liuzzo's civil rights. They were sentenced to 10 years in prison each.