FALLUJAH, Iraq — U.S. Marines battled insurgents in Fallujah on Thursday, with warplanes dropping bombs and tanks shelling suspected guerrilla positions in the heaviest fighting in weeks, erupting as the first residents returned to the devastated city. At least three Marines were killed in the area, the military said.

Fallujans lined up in cars and on foot at checkpoints, brandishing documents to Iraqi police to show they had the right to re-enter the city. Once inside, they returned to the remains of bombed-out and looted homes, some with bodies still inside from weeks of fighting.

The return of residents is a key part of U.S.-Iraqi efforts to rebuild Fallujah after the bloody, two-week U.S. military offensive in November that wrested the city from the control of insurgents. Most of Fallujah's approximately 250,000 people fled before the assault.

But the new fighting highlighted that the city is far from completely tamed. Since the offensive, Fallujah has seen sporadic clashes between U.S. troops and pockets of insurgents, and Thursday's battles were the heaviest since a surge of fighting on Dec. 10 that killed seven Marines, three Iraqi troops and about 50 insurgents.

F-18 fighter-bombers were seen striking at targets in the city's outskirts Thursday, and tank and artillery fire was also heard.

U.S. officials said Marines and insurgents were killed in the Fallujah fighting. A military spokeswoman said three Marines were killed in action Thursday in Anbar province, which surrounds Fallujah.

American commanders have hailed the November offensive in Fallujah as a major tactical victory. But since then, violence elsewhere in Iraq has only escalated, after many guerrillas apparently slipped out of Fallujah to operate in central and northern Iraq.

U.S. forces suffered the deadliest attack on one of their bases, when a blast Tuesday ripped through a dining tent at a base near Mosul, killing 22 people — mostly Americans. The military was reassessing security measures at bases across Iraq after it was determined that a suicide bomber carried out the attack after successfully infiltrating the base, officials said.

The top U.S. general in northern Iraq, Gen. Carter F. Ham, told CNN Thursday that the suicide bomber was apparently wearing an Iraqi military uniform.

A U.S. soldier was also killed Thursday by a roadside bomb in Baghdad, the military said. The deaths raised the number of U.S. troops who have died since the start of the war in March 2003 to at least 1,325, according to an unofficial count by The Associated Press.

Since the Fallujah offensive, tens of thousands of residents who fled have been crowded into camps set up in the region or living with relatives in Baghdad or elsewhere, eager to return to their homes.

With elections approaching on Jan. 30, U.S. and Iraqi officials have been organizing a stage-by-stage return to prevent a flood of people — while at the same time dealing with the persistent clashes with insurgents still in the city.

Authorities had planned on Thursday to allow the return of 2,000 residents, all from a small Fallujah neighborhood called Andalus, a generally commercial district. By the afternoon, only about 200 actually made the trip, according to U.S. officials.

Lt. Col. Kevin Hansen, the Fallujah operations officer with the Marines' 4th Civil Affairs unit, said residents may not be aware of the return, and that more may come on Friday after announcements during weekly prayers at mosques.

"Most of them get their information from the mosques so we think that tomorrow they'll get the word out more," he said.

At a checkpoint into the city, cars were lined up, and returnees showed documents to police and pulled out luggage for search. There was some confusion over who was allowed in and when.

"We traveled hundreds of kilometres (miles) to get to the city," said one man, Abu Omar al-Duleimi. "When we arrived, there was no timetable for our return. And they told us that only a small group could enter the city while others were not allowed."

Once inside, returnees found neigbhorhoods ravaged. "This is all that's left of my property," one man said, waving a dusty blanket. In footage by Associated Press Television News, the corpse of an elderly woman was visible in one destroyed house, lying face down in her black robe. It was not clear how long ago she was killed.

In Mosul, Tuesday's suicide bombing raised questions about how the attacker infiltrated the compound, which is surrounded by blast walls and barbed wire and watched by U.S. troops who search every person going in and check his identity.

Brig. Gen. Ham told CNN, "What we think is likely, but certainly not certain, is that an individual in an Iraqi military uniform, possibly with a vest-worn explosive device, was inside the facility and detonated the facility, causing this tragedy. That's preleminary. We'll find out what the truth is and take necessary actions as we gain more information."

A contingent of FBI bomb technicians has been deployed to help the military investigate the bombing, said an FBI official on condition of anonymity. The Baghdad-based FBI team will help identify the type of explosive and components used, which could provide forensic links to previous Iraq bombings.

The apparent sophistication of the bombing indicated the attacker probably had inside knowledge of the base's layout and the soldiers' schedule. The blast came at lunchtime.

"We always have force protection keeping their eyes out," Lt. Col. Paul Hastings, spokesman for Task Force Olympia, said Thursday. "For somebody that wants to take his life and kill himself, its very difficult to stop those people."

Asked how will they act following the attack, Hastings said that now that the cause of the attack is known, "a full investigation is now ongoing and from that full investigation we will act according."

Early Thursday, hundreds of U.S. troops, Iraqi National Guards and Kurdish militiamen were seen in the streets of Mosul moving around in Bradley Fighting vehicles. In some eastern neighborhoods they searched homes for weapons. One of the city's five bridges over the Tigris River reopened Thursday, after all were blocked off by U.S. troops a day earlier.