Prime Minister Turgut Ozal yesterday defended Turkey's continuing crackdown on "terrorists" as necessary to ensure that his country's return to democracy is successful, and he predicted that "if everything goes all right, martial law will be ended in a year to a year and a half."

At a meeting with editors and reporters from The Washington Post, Ozal defended his government against charges that human-rights violations continue more than a year after the Turkish armed forces ended four years of military rule.

Ozal, who was elected late in 1983, acknowledged that from 7,000 to 8,000 people arrested on political charges are still in prison. But he maintained that "they are terrorists, mostly of the Marxist-Leninist type," and he said that the number is far below the 30,000 under detention at the height of the military crackdown.

Ozal noted that since he came to office, martial law has been eliminated in all but 23 of Turkey's 67 provinces. While the most populous areas around Ankara and Istanbul are still under martial law, he said the situation is reviewed every four months, with the aim of eliminating martial law in roughly a year.

Reagan administration officials publicly have praised what they consider improvements in Turkey's human-rights record and have said they expect progress to continue. However, human-rights groups contend that torture, detention of people without formal charges and tight press censorship are still prominent features of Turkish life.

Ozal also expressed concern about an alleged campaign in neighboring Bulgaria for the forced assimilation of the Turkish community there. Rioting by Turks resisting the communist Bulgarian government's efforts to force them to give up their Moslem religion and adopt Bulgarian names has been reported recently.

Ozal said the Soviet Union, which has enormous influence over Bulgaria, "has said nothing at all" in response to Turkey's pleas that Bulgaria cease these activities. He added that Turkey's only recourse was "to do our best to awaken public opinion in Islamic countries and elsewhere" to the plight of Turks in Bulgaria. "We can't make a war against Bulgaria," he said.