Senegalese troops fought a five-hour battle against rebel strongholds here today and appeared to make gains in their attempt to put down a week-long lefist-led insurgency.

Later, loyalists carried out a dramatic rescue of the hostage wife of President Dawda Jawara and four of their eight children when their rebel captors allowed them to get medical treatment.

Thielal N'Diaye, her 5-week-old daughter and three other children were freed tonight by two unidentified European men who grabbed armed guards who were escorting her and the children through the British-operated Mecial Research Council clinic here.

Meanwhile, a Senegalese commando group freed about 70 foreigners trapped in the Bakotu Hotel, which was surrounded by rebel troops, but elsewhere the rebels continued to hold about 30 hostages, including Jawara's four other children.

U.S. Ambassador Larry G. Piper said two columns of Senegalese soldiers engaged in "quite heavy fighting as they moved closer to the Gambian insurgents holed up in a police barracks."

Jawara invited forces from neighboring Senegal to put down the takeover attempt that broke out last Thursday, while Jawara was in London for the royal wedding. About 1,500 Senegalese troops have been fighting here sporadically since then against a group of civilian leftists and their allies in the country's paramilitary forces.

About 300 people have died in the fighting in this small West African capital of 40,000 people. A walk today through downtown Banjul from the Gambia River ferry landing revealed the destruction that swept the city on the first two days.

Large shops were emptied, their windows smashed and shelves knocked over by looters. A block-long string of shops and a movie theater were burned down.

Gambian paramilitary police loyal to the government and Senegalese troops patrolled the streets. The loyalists have decreed a 7 p.m.-to-7 a.m. curfew.

Today's fighting lasted from 8:15 a.m. to 1 p.m. In a news conference, Ambassador Piper said the Senegalese troops wre partially successful in forming a wedge between the rebels in their captured police barracks and the approximately 400 foreigners living in the Bakau-Fagara suburb west of Banjul.

The rebels have held the Bakau police barracks almost since the beginning of the fighting. In an apparent effort to begin negotiations with Jawara's government, the rebels released two hostges two days ago, but no available official, including Piper, knew today what the status of any of the talks were . The talks, however, appeared to have resulted in the rebels' agreement to take Jawara's wife and children for medical treatment, leading to their rescue.

In a brief interview, N'Diaye said her captivity had been "very cruel" and that the rebels had "threatened to kill of us." She said the rebels claimed that they will "fight to the death" against loyalist forces and Senegalese soldiers that have them completely surrounded.

Led by an obscure Gambian leftist named Kukli Samba Sanyang, the rebels declared in radio broadcasts that they wanted to establish a "Marxist-Leninist dictatorship of the proletariat."

Initially, eyewitnesses said, may Banjul residents cheered the coup-makers and spontaneously celebrated in the streets. The mood soured, however, when looters began to attack shops owned by Lebanese and Indian residents. Some of the rebels then turned on the looters and shot them, according to the reports.

The initial cheering response of some of Banjul's residents was a reflection of "deep-seated urban discontent" with the country's deteriorating economic situation, Piper said. "The economy of Gambia was in pretty bad shape before the coup, and now it's in shambles," he added.

It was also learned that both the American and British governments have transport planes on standby alert in Daker, Senegal's capital, to evacuate their nationals if the situaton here deteriorates seriously. Piper said there were about 200 Americans here. He said his residence in Bakau is filled with 123 persons, 80 of them Americans. The others at his home "were brought there by the rebels so that they would be safely out of the way," Piper said, adding that "the rebels are very disciplined."

Asked for evidence of repeated accusations that the rebels were foreign-trained and -equipped, Piper said some weapons captured "were foreign arms that were not in the armory" when it was captured at the start of the rebellion.

Even after the coup is put down, Piper said, the short-term future for Gambia is not bright. He said Senegalese soldiers will have to remain to augment the police force, divided by the coup, and curfews will continue for some time in the future. "It is not going to return to normal for a long time," he said.