With British tanks, French jets, American helicopters and an expected doubling of U.S. military assistance, Honduras is building up a military machine capable of launching a war against the 22-month-old leftist revolutionary government of neighboring Nicaragua.

Officially, both sides say they hope to avoid a fight and to improve relations. A war between them could spread through this volatile area like fire in a bomb factory, possibly involving Cuba as well as the United States.

But honduras' present military rulers are beset by deep divisions as November elections for the first civilian government in more than a decade approach and economic problems worsen. According to well-informed Army and political sources, a group of militant commanders who might regard war -- or the very near presence of it -- as beneficial to their own interests and the nation's is steadily consolidating its power.

Conservative governments throughout the region regard Nicaragua as a threat to regional security. Many Honduran commanders, in particular, see the existence of the Sandinista government as intolerable and believe it must be eradicated.

Add to this provocations and plots by anti-Sandinista Nicaraguan exiles operating out of Honduras, and the often defensive belligerence of the Sandinistas themselves, and there are the makings of a major conflict.

The vital question of how the United States would regard such a venture, however, is unresolved. As one well-informed Honduran colonel put it, "We are not going to do anything that is not supported by the United States."

The U.S. Embassy here would not comment on Washington's position with respect to such a war, and diplomats said privately that the Reagan administration has not yet taken a firm stand on the question.

Gen. Vernon Walters, the former deputy CIA director acting as special trouble-shooter for Secretary of State Alexander M. Haig Jr., will be visiting Honduras next week to discuss the current situation as well as Honduran requests for arms supplies above those the Reagan administration is currently comtemplating, according to informed sources.

Meanwhile, tensions are steadily growing on the Nicaraguan-Honduran border, which stretches all the way across the Central American isthmus.

In mid-April, the Honduran president, Gen. Policarpo Paz Garcia, issued an internal memorandum to the Honduran Army saying that it should be ready to defend the homeland from Nicaraguan aggression, according to Western diplomatic and Honduran military sources.

After a 40-minute confrontation between Honduran and Nicaraguan troops at the border outpost of Guarsaule near the Gulf of Fonseca last Wednesday, Honduras placed its troops on alert, closed the border to commerce between the two countries (already the subject of a tariff dispute) and started beating the drums of war in the local press. Headlines in Tegucigalpa that day proclaimed that "Honduras is ready to defend its national integrity."

The Honduran Army has not yet fully mobilized, but, according to military officials, it would require only 72 hours to move enough troops for an invasion to the border with Nicaragua.

Relations between Honduras and Nicaragua are complicated by the presence of exile groups in Honduras that include members of the Nicaraguan National Guard, the defeated force fo the former dictatorship of Anastasio Somoza who fled following his overthrow in 1979. These groups regularly cross from Honduras into Nicaragua to stage small-scale attacks on Nicaraguan farms and occassionally the army of the Sandinistas. On several occasions the Sandinistas are alleged to have pursued these "counterrevolutionaries" back into Honduran territory, according to diplomatic and Honduran government sources.

Some of these anti-Sandinista groups are little more than roving bandits, but others are part of well-organized clandestine armies that claim they have extensive support with Nicaragua.

Members of these organizations apparently are attempting to exacerbate frictions between Honduras and Nicaragua. In one recent incident, according to a Latin diplomat, a band of perhaps a dozen men fired several shots at both the Honduran and Nicaraguan border posts near Guasaule in what seemed an effort to spark a larger confrontation.

Several influential members of the Honduran Army, including Leonidas Torres Arias, chief of military intelligence, are alleged by their fellow officers to have or to have had close ties to Somoza and his family.

One scenario for a Nicaraguan-Honduran war discussed by ranking Honduran officials would wait for the already serious economic difficulties faced by the Sandinistas to grow worse. If, as is expected, Nicaragua experiences major food shortages during the summer and early fall, then widespread riots and discontent with the Sandinista government could be expected. In such a case the counter-revolutionary Nicaraguans could begin to take major initiatives and Honduras could support them logistically, and possibly tactically with air power, while avoiding a direct invasion that might rally patriotic support for the Sandinista government.

A direct Honduran invasion of Nicaragua remains a distinct possibility, however, as Honduran military men have come to believe that Nicaragua presents a threat to all of Central America.

"The new center of subversion is not Cuba," said one Honduran officer, "it is Nicaragua."

On a public level, both Nicaragua and Honduras are trying to defuse the conflict.

Although the Sandinistas frequently have denounced the actions of exiles working out of Honduras and suggested that the Honduran military may be aiding them, they have attempted at the same time to soothe their northern neighbor with assurances that the Sandinista armed forces are strictly defensive. They also have made such gestures as the recen repayment of $3.5 million in debts to Honduras.

For their part, a few months ago the Hondurans dispersed several refugee camps used as bases by Nicaraguan ex-guardsmen. At present, according to Honduran Vice Minister of the Interior Jose Angel Lara, there are only about 3,000 Nicaraguan exiles scattered around Honduras. Another 3,000 have left the area, Lara said.

"As far as we are concerned Nicaragua ought to have its own life," said Lara. "Right now relations are good and we are trying to make them better." Border incidents, he suggested, are always common after a revolution such as Nicaragua's.

But the official position of Honduras has little to do with the internal political realities of the situation here. The U.S.-promoted elections scheduled for November would do away with the current military government.

Paz Garcia has openly supported the electoral process. But Paz Garcia is the first among several equals in the Honduran military-governmental system.

The de facto government of Honduras is in the hands of seven senior officers: Gustavo Alvarez, chief of the public security forces; Huberth Bodden, commander of an infantry batallion near the capital; Ruben Humberto Montoya, chief of the Honduran Marines: Leonidas Torres Arias of military intelligence; Rigoberto Regalado Lara, commander on the Salvadoran border; Walter Lopez, head of the Air force, and Daniel Bali Castillo, commander of a batallion in Choluteca that has responsibility for the border around Guasaule.

The most powerful of these is Alvarez, who visited Washington last week in search of further increases in U.S. military aid to Honduras, according to several informed sources.

Several military officers here say that many of these senior commanders, who rode Paz Garcia's coattails to power during the 1970s, have profited mightily from this country's notorious governmental corruption. Because they are affiliated with neither the National Party nor the Liberal Party, which will be the major contenders in November's elections, they have no interest in seeing civilians come to power at all.

Furthermore, there is widespread apathy about the elections in general since neither the Liberal nor the National Party leader is popular among the Honduran people. Few Hondurans seem to expect that either party could resolve the nation's serious economic and social problems.

A war followed by a coup, according to this line of thought, would preserve the power of the senior officers and, in the name of anticommunism, meet with the tacit or explicit support of the Reagan administration.

The growth of the Sandinista Army is a major concern. No solid statistics have ben made public but the Sandinista regular Army is estimated to number more than 30,000 soldiers and may soon exceed 50,000, which would make it as large as all other Central American armies combined. Sandinista militias are believed to include 100,000 or more part-time soldiers. There troops are receiving increasing amounts of arms from the Soviet Bloc.

The Honduran Army counts on no more than 12,000 men. But Honduras recently took delivery of 16 British Scorpion light tanks which, in the estimate of one major concerned with the purchase, are worth 40 men apiece and could be especially effective in the relatively flat Guasaule area. a

The Honduran Air Force, moreover, is the best in Central America. It includes six Israeli-modified French Super-Mystere jets purchased during the 1970s. The Nicaraguans have virtually no air force.

In their presentations to American military and diplomatic officials the Hondurans say they need more arms because of the general military situation in the area. Although they have signed a peace treaty with El Salvador, ending, with U.S. prodding, 10 years during which they were technically at war, they suggest that it is their traditional enemy and could be dangerous for them with an army backed by $25 million of American aid.

"El Salvador is armed by the United States, Nicaragua by the Soviets and Guatemala [to the north] is never at a loss militarily," said one Honduran major. "We are caught in a sandwich."

But in fact the prinicpal preoccupation of the Hondurans is no longer El Salvador, with which Honduran troops frequently cooperate to fight leftist guerrillas in the border area, and it never was Guatemala.

The State Department has emphasized the need to supply Honduras with more and better military equipment to help stop arms supplies smuggled from Nicaragua to the Salvadoran guerrillas through Honduran territory. To this end the United States has loaned Honduras 10 Huey UH1H helicopters, but, according to diplomatic and military sources, these generally are not being used near the Salvadoran border. Recently, all nine currently in operation could be seen on the ground at the Tegucigalpa airport in the center of the country.

U.S. military aid to Honduras has grown steadily over the last three years, as the Carter administration sought to fight Salvadoran guerrillas and to arm a friendly regional power but avoid criticism of weapons sales to human rights abusers in El Salvador and Guatemala.

The Reagan administration has proposed increasing foreign military sales credits to Honduras from $5 million in fiscal 1981 (up from $3.3 million in fiscal 80) to $10 million in fiscal 1982. This would make. Honduras the third largest recipient of U.S. military aid in Latin America after El Salvador and Colombia. In addition, U.S. funds for training Honduran troops would increase in 1982 from $495,000 to $700,000.

Honduran officers who favor war with Nicaragua, according to military and diplomatic sources, are persuaded that the Reagan administration ultimately will take their side. But several officers who are opposed to a war, although they have lost out in the military's internal political feuds, are convinced that an attack of any kind on Nicaragua would be disastrous.

Those arguments were best summed up by a senior Honduran officer who recently lost his commission after feuding with members of the high command. He asked that his name not be published.

He noted the difference between Nicaraguan troops, whom he considers highly motivated and commanded by capable officers, and Honduran soldiers who are literally dragged into the service of their country.

"In my opinion," he said, "war with Nicaragua would be the end of the Honduran Army. In Nicaragua you have commanders who fought in the revolution and who have akind of mystique about them. Her soldiers are rounded up into the Army from buses and movie houses and concerts. And you have a high command that would send them out to fight, then take off for Miami the minute things got bad.

"Many of these officers are thinking that they have to act now because of the concern that Ncaragua will soon have the most powerful army in Central America," said the official. "But they would need popular support and they would need the backing of the United States even so. They have the desire but they don't have all the cards . . . The United States has its eyes on El Salvador. These have put their eyes on Nicaraguan. If they all turn to the same viewpoint, that would be dangerous."