This country's two most prominent rebel politicians returned today after more than four years in self-imposed exile and promptly proceeded into guerrilla-controlled territory near here to spend the night in a guerrilla camp prior to Monday's peace talks with President Jose Napoleon Duarte.

Guillermo Ungo and Ruben Zamora, leaders of the Democratic Revolutionary Front (FDR), the political umbrella of the guerrilla alliance that has been fighting a civil war against the Salvadoran government for the past five years, arrived earlier at an almost deserted airport near the capital. They were whisked to this small artisans' town 45 miles north of San Salvador to prepare for their historic meeting with Duarte.

Although Duarte's minister of the presidency, Julio Rey Prendes, told reporters in San Salvador that Duarte would present a "peace proposal" at the meeting here Monday morning, Ungo told an impromptu news conference in the center of this town that the planned talks were only a "first step" toward peace. He warned, "There are no magic formulas."

Immediately after talking to the press, Ungo, Zamora and a group of followers, all unarmed, marched out of town up a hill into the dense vegetation for a rendezvous with guerrillas who have controlled most of this strip of northern El Salvador for the past 18 months.

The two leaders plan to spend the night in a camp talking to senior guerrilla leaders who are expected to join the talks in town.

The Army and the guerrillas have left this small impoverished town, located near the Honduran border, between areas usually controlled by the Army and those usually in guerrilla hands. Rebel fighters were last seen here Thursday, and an Army battalion withdrew Friday under orders from Duarte, after briefly occupying the town.

But if there were no armed men in evidence today, both the guerrillas and the government had political workers in civilian clothes spreading propaganda prior to the peace talks that are to begin at 10:00 a.m. in the small Catholic church.

Government workers were pasting simple signs on walls that said: "Duarte, president of peace." Other young men, apparently guerrillas who had left their guns in the surrounding hills, put up signs that read: "Dialogue without propaganda."

Three young men with a guitar and flutes, meanwhile, serenaded a subdued populace with leftist folk songs on the street in front of a small restaurant.

Ungo and Zamora had arrived in a Colombian Air Force plane at Comalapa airport, 25 miles south of San Salvador, accompanied by three Latin American and European diplomats.

They announced that they would be joined in talks with Duarte and his government by Joaquin Villalobos and Ferman Cienfuegos from the rebel alliance's military wing. Each is a commander of one of the five guerrilla forces in the Farabundo Marti National Liberation Front.

The government, which has guaranteed the rebel leaders' security, ordered the armed forces to withdraw from the airport for the arrival. Given the hostility between the rebels and the Army, the decision was necessary "to avoid provocations," a senior government information officer, Gerardo le Chevallier, said.

The rebels' arrival constituted a political victory for them, as they achieved their long-desired goal of holding talks with the government inside El Salvador. But they had to depend on the good offices of the Red Cross, and on Duarte's guarantee of security, to return safely. Duarte, who first proposed the meeting in a speech to the United Nations last Monday, noted with satisfaction Friday that the two apparently were unable to return to the country through territory controlled by guerrilla military forces. Duarte's life has been threatened by a right-wing death squad since he offered the peace meeting.

Both Ungo and Zamora were members of a short-lived Salvadoran government that was installed by junior military officers who overthrew a rightist military dictatorship Oct. 15, 1979.

Zamora, 40, a former leader of Duarte's Christian Democratic Party, left the country after a right-wing paramilitary group assassinated his brother, Mario, in 1980.

Ungo, 53, a social democrat, left the country and became the leader of the Democratic Revolutionary Front when its original six-man leadership was killed after being surrounded by military troops and abducted by plainclothes men from a political meeting here that same year.

Traveling to El Salvador from Panama with Ungo and Zamora were the Colombian and French ambassadors to Panama, according to a French diplomat and a Salvadoran government official.

"We are very grateful to the international community" for its support, Zamora said. Duarte had resisted allowing the two men to be accompanied by diplomats because of his proclaimed desire to limit the negotiations to Salvadorans, reliable officials said.

Ungo and Zamora emphasized their willingness to begin a dialogue as a "first step" to "conquer peace" in El Salvador.

About 50 reporters and a small group of diplomats were the only welcoming party at the airport for the rebel officials, but Ungo and Zamora did not comment on the lack of any public display of support for them. Le Chevallier, who is Duarte's director general of information, suggested that the two politicians, who once headed political parties here, had "lost support among the urban masses."

He acknowledged, though, that the absence of any public demonstration might have been due to worries about security.

Duarte was scheduled to leave for La Palma by car at 6 a.m. Monday, along with government officials including the defense minister, Gen. Carlos Eugenio Vides Casanova. Le Chevallier said that any Army officers in the party would wear civilian clothes.

According to a telephone interview from Panama with Democratic Revolutionary Front official Salvador Samayoa broadcast here today and reported by The Associated Press, the guerrillas remained concerned about several aspects of the meeting Monday, including the "circus atmosphere" Samayoa said Duarte had created in La Palma by inviting Salvadoran workers and peasants.

La Palma, normally under rebel control, was reported today to be swamped with reporters and television crews.

The rebel official questioned the status of a six-mile demilitarized zone Duarte had declared around the town, particularly in view of the brief occupation of La Palma Friday by Salvadoran Army troops.

Samayoa said the rebels also were concerned about whether foreign observers, including the diplomats accompanying Ungo and Zamora, would be allowed to attend the meeting.

Duarte has said that the talks were to be observed only by representatives of the Salvadoran Catholic Church.

Samayoa said the rebels also wanted to know whether a joint communique would be signed to avoid later distortions about what was said at the meeting.