Three U.S. military personnel spent last night in a Salvadoran Army field command post here on the first night of a major Army offensive despite rules barring them from visiting areas where combat is likely.

The U.S. personnel -- including Col. James Steele, head of U.S. military trainers here -- said they came at the invitation of the Salvadoran colonel in charge of the offensive after he assured them that they would not be involved in combat. Perquin is deep inside territory usually controlled by left-wing guerrillas. About 100 of them, according to residents of the town, evacuated about 30 minutes before the Army helicopters began landing nearby.

The three Americans later reported to the embassy that they had not come under fire, Ambassador Thomas Pickering said this afternoon. At least two other helicopters flying the same route that the advisers flew during the afternoon, however, had drawn ground fire.

In addition, the Americans were here yesterday afternoon, when Salvadoran troops no more than 1,000 yards away opened fire on suspected guerrilla positions, and this morning, when a mine exploded on the edge of town and severely wounded a Salvadoran soldier.

This correspondent and five other American journalists, who also spent the night in Perquin, saw the three U.S. military personnel here. The other two U.S. personnel, besides Steele, were the U.S. naval attache, who is a Marine lieutenant colonel, and an Army sergeant who is an aide of Steele's. Pickering asked journalists this afternoon to keep the two latter men's names out of print to avoid possible reprisals against them or their families by left-wing guerrillas.

Pickering backed the three men's decision to visit Perquin, saying that they "absolutely" had not broken what the embassy calls "terms of reference" for U.S. military personnel here.

Steele "was in the middle of the Atlacatl Battalion in Perquin. It was his judgment, which I agree with, that he was in as safe a place as he could be in El Salvador," Pickering said. The U.S.-trained battalion, one of the Salvadoran Army's elite units, established its field command in Perquin yesterday.

The incident illustrates that U.S. military personnel, in effect, have begun to travel more widely in El Salvador. U.S. military trainers were displaying significantly more caution a year ago about being seen visiting areas near combat.

According to the embassy's "terms of reference," which have been in effect for more than two years, U.S. military personnel are to avoid being "placed in situations where combat is likely."

Limits on activities of U.S. military personnel here have been established to assuage fears in the U.S. Congress and public opinion that Americans are running risks. Five U.S. military personnel are known to have been ordered to leave the country since February 1982 for engaging in activities considered too close to direct involvement in combat.

Steele and the two other U.S. military men flew to Perquin to observe the performance of the Atlacatl Battalion in its helicopter-borne assault yesterday at the start of a 2,300-troop offensive against northern Morazan province, one of the guerrillas' two principal strongholds, U.S. officials said. The Americans offered no advice to the Salvadoran field commander, Lt. Col. Domingo Monterrosa, within the journalists' earshot.

Steele declined to be quoted for the record, but one of the three Americans said that the three came "to get their the Salvadorans' assessment of what is essentially a new type of operation, using air-mobile assets, seeing how new equipment is being used."

At one point the U.S. sergeant twisted a piece of wire to show a Salvadoran soldier how to trigger an apparent booby trap from a distance. A reporter called out to his colleagues that the sergeant was going to deactivate the device, and Steele, who was standing nearby, barked back, "You're not going to deactivate anything."

"No sir," the sergeant replied. The Salvadoran later attempted to trigger the device, which turned out not to be a booby trap.

About 800 troops of the Atlacatl were airlifted yesterday north to points near Perquin and San Fernando. They occupied the towns, and then fanned south hunting the insurgents. At the same time, an additional 1,500 troops marched north of the Torola River -- the effective boundary between rebel- and government-held territory in the northeastern province -- and tried to trap the rebels.

As of midday today, Salvadoran officers reported that the rebels had offered virtually no resistance. One Salvadoran soldier and two guerrillas had been confirmed as dead as the rebels seemingly vanished in the steep mountains covered with lush forests.

"They decided to avoid contact," Maj. Armando Azmitia, commander of the Atlacatl Battalion, said.

The three U.S. military men all carried automatic rifles in line with U.S. rules allowing them to carry weapons for self-defense. Steele and the sergeant carried the CAR15, which is virtually the same as an M16 except that it has a shorter barrel and thus has a shorter range and less penetration power. The M16 is standard issue for the U.S. and Salvadoran armies, but U.S. military personnel are not allowed to carry it because it is considered a standard combat weapon.

[The Associated Press reported that in a broadcast, the guerrillas called the Morazan operation "yet another defeat for the puppet army," saying they had received word of it 72 hours in advance and had cleared out of the area.]