Within hours last night of Edward Seaga's sweeping electoral triumph over Jamaican Prime Minister Michael Manley, the island's police and Army began what they called a mopping up to clear the city's rambling slums of political gunmen.

There were sporadic outbreaks of violence in several of the Kingston ghettos today. Four police officers and another man were reportedly shot to death and one woman wounded in the 24 hours since the polling ended. The man was reportedly killed by security forces after he opened fire on them.

But the surprising extent of Seaga's victory -- with unofficial tallies giving his Jamaica Labor Party at least 50 of Parliament's 60 seats -- appears to have amazed and heartened this politically turbulent country. The final tally of the election results is still incomplete and is not expected until Monday.

After eight years of the progressive socialist, but increasingly inefficient government headed by Manley and his People's National Party, the theme heard most often in the streets today was "deliverance."

The U.S. Embassy here has tried to stay as far from the election limelight as possible, but many analysts consider the Boston-born Seaga's victory a triumph for Washington. Manley's conspicious friendship with Cuban President Fidel Castro, his call for Puerto Rican independence and the increasingly radical rhetoric of his government have been constant worries to State Department officials in recent years.

While the Carter administration had been able to live with the Manley mystique in Third World politics, especially since he supported U.S. positions on Afghanistan and Soviet interventionism, Washington became increasingly concerned at the prospect of the largest English-speaking island in the Caribbean becoming a better ally of Havana than of Washington.

Manley had denied that this was the case. But the most radical wing of his party seemed to be gaining ground on the prime minister and gaining influence among voters, and Washington was anxiously hoping for a change of government.

Seaga's strongest suit among voters has been his virulent anticommunism. But while Jamaicans are certain of what they rejected by voting out Manley's government, the course Seaga will take is not altogether clear.

His first public pronouncement in his victory speech last night was a call for the expulsion of Cuban Ambassador Ulises Estrada -- considered a symbol of Cuban influence on this island of 2 million people.

Where Manley had called for reconciliation and attempts to put "Humpty Dumpty back together" among this people bitterly and bloodily split by partisan politics, Seaga simply exulted in his "tumultuous victory" and over what he believes is the defeat of the communist menace.

Expectations for the new prime minister, who will formally take office Saturday afternoon, are running extremely high. But no one is more aware than Seaga of the enormous obstacles that stand between Jamaica and its former prosperity.

While in campaign rhetoric Manley blamed outside forces and internal sabotage for the nation's virtual bankruptcy -- and Seaga blamed Manley -- the truth lies somewhere in between.

Jamaica's need for enormously expensive imports, especially oil, and the island's declining productivity may take years to reverse. In the meantime, shortages, unemployment and social inequities will only continue to fester.

As Seaga said in his party's manifesto, "The most fundamental question confronting Jamaica today is survival," and as he told a reporter Sunday "being prime minister is not a prospect that one with any sanity should look forward to, because it's going to be a very tough job."

At another time in history, Seaga might be considered a socialist. But today in Jamaica he is looked on as one of the island's strongest supporters of capitalism.

Seaga believes the first steps toward a solution to Jamaica's problems are resuming negotiations with the International Monetary Fund, which were broken off by Manley, and creating a better general atmosphere for investment.

While he is less ecstatic about social justice than Manley, Seaga says he realizes the necessity for extensive aid to this nation's impoverished majority and that his will be a more efficient administration that will deliver more effectively on such promises and needs than Manley did.

But the most pressing problem of the moment is to end the partisan violence that has cost more than 500 lives this year. Since Seaga's election last night, he has relied not so much on exhortation for peace but on Jamaica's Army and police to do the job.

When snipers fired on the high-walled headquarters of the Jamaica police last night, killing one police officer, a house-to-house search was instituted and referred to as Operation Wipeout.

By early afternoon, 98 people were detained by police.

Radio stations here reported that at least five police stations had been fired on, and gunmen were also reported to have prevented fire fighters from reaching several blazes.

Outside Kingston, a number of minor clashes between supporters of the two parties and some looting were reported.

Manley, meanwhile, has kept a low profile, and it appears unlikely he will remain long as opposition leader.

"You know, really, the leader of the opposition's role is a very negative sort of thing," Manley said yesterday, adding that he would probably find the role boring after being prime minister.

Manley's departure from the scene would leave the People's National Party in the hands of its most radical idealogues, including general secretary D. K. Duncan, who has made no secret of his revolutionary fervor.

As things stand such a change could cause the end of any moderation in the People's National Party and make it ever more difficult for Jamaica, and Seaga, to put "Humpty Dumpty together again."