As Sandinista rebels continued the battle to drive Nicaraguan President Anastasio Somoza out of office in Managua, their provisional government here expressed optimism that it had garnered enough diplomatic support to move into Nicaragua sometime this week.

Members of the five-member junta met this afternoon with special U.S. envoy William Bowdler.

Earlier, the junta's "foreign minister," the Rev. Miguel D'Escoto, a Roman Catholic priest of the Maryknoll order, spoke by telephone with some of the foreign ministers of the five-nation Andean Pact who are meeting in Caracas, Venezuela, to discuss the Nicaraguan situation.

The Guerrilla-backed junta has asked all countries in the hemisphere to break ties with the Somoza government to hasten what the junta sees as Somoza's inevitable fall.

Panama and Grenada are the only Latin American countries out of a handful of nations that have recognized the junta's provisional government. The revolutionary Islamic government in Iran today announced its recognition of the junta.

The Andean Pact nations - Venezuela, Colombia, Bolivia, Ecuador and Peru - have voiced varying degrees of support for the junta, but strong diplomatic action has been delayed by the reluctance of individual pact members to make unilateral action.

[Msgr. Miguel Ovando Bravo, archbishop of Managua and a Somoza critic, said today that he was flying to Caracas to participatein talks with the Andean Pact nations, United Press International reported.]

Junta representatives here claim that between 75 and 80 percent of Nicaragua is in the hands of the Sandinistas. But observers in Managua said the Sanndinistas control about half the populated area.

The drive to oust

D'Escoto and two members of the junta said before meeting with Bowdler today that they felt confident the U.S. envoy was satisfied with assurances they had given him that the human rights of Somoza's supporters would be respected once the new government comes to power.

Somoza has said he will step down if the United States can guarantee the continued existence of his two main bases of support - the Liberal Party and the National Guard.

Junta member Sergio Ramirez and D'Escoto said today that they had told Bowdler in previous meetings that any person who feels threatened by the new government will be permitted to take refuge in churches or other places supervised by the country's Roman Catholic hierarchy.

It was understood here that during the period after Somoza's resignation and before the junta takes office Somoza's supporters will be permitted to slip out of the country.

Once the junta takes office, however, any member of the National Guard accused of a crime will be tried by the civil courts, junta sources said.

U.S. officials did not respond to reporters' requests for information about the talks with the Junta.

It appeared that the United States has dropped its insistence on enlargement of the junta and retention of the National Guard in its present form and is trying to ensure that Nicaragua will be spared mass executions like those in Iran recently or in Cuba after Fidel Castro took power.

Ramirez explained what he said was the junta's plan for returning the country to democracy after more than 40 years of authoritarian rule by the Somoza family. He said the electoral system will be reorganized and elections will be held in three stages - first municipal elections, then the choosing of a national assembly to draft a constitution and finally election of a new president. He said the process should take less than two years.

In the interim, he said, the country will be governed by the junta with a 34-member legislative branch whose members will be named by a wide variety of political, business, religious and other groups that already have agreed to participate in the proposed government.

Washington Post correspondent Karen DeYoung reported from Managua :

U.S. Ambassador Lawrence W. Pezzullo met with Somoza this afternoon for the second day in a row. Pezzullo was unavailable to reporters and neither the embassy nor the Somoza government commented on the talks.

Despite the fact that Somoza's imminent departure has been rumored for weeks, speculation rose again today that he will leave the country within the next several days. Officials in his government, however, insisted that the president is not satisfied with the composition of the junta or the guarantees it has offered the National Guard.

Meanwhile, tension increased in anticipation of a new rebel assault on the capital, where sporadic fighting continued throughtout the day. While neither the National Guard nor the guerrillas have made significant military advances during the past week, intense battles continue in several parts of the country.

The National Guard kept up its counteroffensive Saturday on rebel-held Masaya, 20 miles south of Managua, with heavy air and artillery bombardment from outside the city. In northern Nicaragua, skirmishes were reported outside the city of Chinandega, which has remained in government hands despite sporadic rebel assaults.

Clashes also were reported at the crossroads town of La Paz Centre approximately 20 miles south of guerilla-occupied Leon. CAPTION: Picture, Sandinista guerrillas, armed with heavy artillery, prepare to go into battle near Rivas, Nicaragua.