ISTANBUL, NOV. 29 -- Turkish voters, taking part in the country's first civilian-run election since a military coup in 1980, overwhelmingly endorsed prowestern Prime Minister Turgut Ozal for a new five-year term today and rejected the comeback attempts of two politicians whom the military arrested seven years ago.

With almost 50 percent of the vote counted by midnight, unofficial returns showed that Ozal's Motherland Party was leading with 36.1 percent.

The closest rival, Erdal Inonu's Social Democrat Populist Party, had 23.9 percent. In third place -- with 20.3 percent -- was the True Path Party of former conservative prime minister Suleyman Demirel, who was ousted in the 1980 coup.

Demirel's former political rival in the 1970s, Bulent Ecevit, was trailing with a little more than 8 percent of the vote.

Ozal, 63, is an economist and technocrat who favors a strengthened alliance with Europe and the North Atlantic Treaty Organization and supports the presence of U.S. bases in Turkey. He declared victory tonight, saying his party would have the majority when seats in the new 450-seat parliament are allocated. "The results so far show we will be the party in power, alone," Ozal said in a statement.

Political analysts viewed the voters' rejection of Demirel and Ecevit as an indication that democratic Turkey has moved away from the turbulence of the 1970s, when the two politicians alternated the prime ministership in a bitter rivalry that left the country violently divided and its agriculture-based economy in shambles. In 1980, the military stepped in to overthrow Demirel's last government after a period of extremist violence that claimed about 5,000 lives.

After taking over the government, the military, which has staged three coups since 1960, arrested Demirel, Ecevit and hundreds of other political leaders of the left and right and banned them from politics for the next decade. The generals also made Ozal, at the time Demirel's minister for economic planning, deputy prime minister in the military government and put him in charge of putting Turkey back on its economic feet.

Ozal set up a free-market system to replace the nation's bureaucratized state-planning system, bringing the country its first taste of prosperity in decades.

The generals ruled the country for three years, long enough to oversee the crafting of a new constitution that incorporated the ban on political activity by Demirel, Ecevit and others.

In 1983, the generals stepped down, after supervising an election involving only those political parties and candidates that they approved.

With no real opposition, Ozal and his party won hands down, with 250 seats in a 400-seat parliament.

But many Turks, as well as Western European governments, did not consider Ozal's victory legitimate, because the country's former leading politicians were not allowed to participate. The Western European view was important to Ozal, who has pushed for Turkish membership in the European Community.

Nagged by a sense of illegitimacy, Ozal last summer proposed a referendum on lifting the military's ban on Demirel and Ecevit.

In September, when Turkey's 26 million voters agreed by a razor-thin majority to allow the banned politicians back into politics, Ozal immediately called new elections, apparently confident that he could prevail over the rapidly reorganizing politicians from Turkey's turbulent past.