COLOMBO, Sri Lanka - The Sri Lankan military shelled a makeshift hospital inside a government-declared "safe zone" for civilians in the north Thursday, killing at least 20 patients and injuring scores of others, a rebel-linked website reported.

The military denied hitting the hospital and said it was taking precautions to protect civilians, but a local health official confirmed that the hospital had been shelled repeatedly since Wednesday.

TamilNet said at least 46 civilians had been killed by government shelling since Tuesday.

Meanwhile, the military announced that it had captured a building the rebels had used as their main operations center.

With the government's offensive against the Tamil Tigers escalating, international aid groups are increasingly concerned about the safety of the hundreds of thousands of civilians reportedly living inside the shrinking pocket of rebel-held territory in the northeast.

Human rights groups have accused the rebels of forcing civilians to stay in the area to act as human shields.

In an effort to coax them to leave, the government dropped leaflets throughout the region Wednesday announcing the establishment of a "safe zone" on the edge of rebel-held territory that it would not attack. Civilians there would then be transferred across the front lines, the military said.

But an hour after the leaflets were dropped, two shells hit a makeshift hospital located in a school in Vallipunam, a village inside the "safe zone," said Kandasamy Tharmakulasingham, a local health official.

On Thursday morning, the hospital was hit again in an attack so devastating that health officials were having difficulty counting the bodies, he said, adding that at least 20 patients appeared to have been killed and 104 people were injured. He did not say who was behind the attack.

TamilNet blamed the military for the assault. It said 24 civilians were killed by noon Thursday, in addition to the 22 killed over the previous two days.

Military spokesman Brig. Udaya Nanayakkara denied the report.

"We have demarcated the safety zone and we didn't fire into that area," he said.