The halls of the main hospital here are eerily quiet, the mattresses rolled up on folding beds. Stretchers are stacked in storage closets. Doctors and nurses sit and wait.

Over the past two weeks, Al Magaryaf Hospital emptied out as a city that was once an intense battleground became a ghost town.

Rebel fighters are now lying in wait in pockets of the city. Others stand watch at Ajdabiya’s western gate, and farther west along the highway, scouting for signs that forces loyal to Moammar Gaddafi might be headed their way.

Some of the volunteer warriors who had rushed to join the uprising have moved back to Benghazi, the de facto capital of the opposition-held east of the country, for the training they badly need.

Their positions mark a shift in strategy for those seeking to depose Gaddafi. In the early weeks of this conflict, rebels fought erratically along a coastal road, progressing unevenly against better-armed government-backed forces. The fighting, which took a heavy human toll and depleted ammunition reserves, plunged the country into a bitter stalemate.

Now, the rebels are regrouping, getting the training they need to prepare fresh advances, opposition leaders here say. But the lull in fighting could also mean that Gaddafi’s forces are themselves regrouping on the other side of the battle lines.

“Basically [the rebel fighters] are sorting out their house and putting everything in perspective,” said Jalal el-Gallal, a rebel spokesman in Benghazi.

The rebels are digging trenches to fortify their positions, finding vantage points on hilltops to watch Gaddafi’s forces and putting together a reliable communications system. Gallal said he hopes the past is behind them now, when untrained fighters made decisions to advance independently, with no plans to take and hold ground.

“In the past, going forward has always meant being pushed back,” he said.

Western observers say a military victory for the rebels is unlikely. There isn’t enough time to train these men who before the conflict had never carried weapons. Instead, the rebels are hoping that NATO firepower and sanctions will chip away at Gaddafi’s inner circle, making it untenable for the leader to remain in power, a Western observer in Benghazi said on the condition of anonymity because he was not authorized to speak publicly.

“One has to conclude: They will never win this war using their military,” the observer said.

After weeks of deafening battles, the rattle of artillery and gunfire has mostly ceased in this strategic city, which serves as the final frontier before the largely Gaddafi-controlled west of the country.

About 20 miles west of Ajdabiya, rebel fighters scout the road but have not advanced toward Gaddafi’s forces, which are stationed in the oil hubs of Brega and Ras Lanuf. Defectors from the Libyan military who now belong to the rebel-run Libyan National Army guard the main road on the city’s western edge. These soldiers persuaded the roughly 5,000 volunteers who haphazardly had been advancing west to return to Benghazi for training, said Col. Hamed al Hassi, the first commander to defect from Gaddafi’s military.

“We had a problem with the young men at the [western] gate. They would just move west and engage,” he said. Now only seasoned soldiers are gearing up for battle, he said.

Hassi stood on the dusty road just outside the gate surrounded by charred tanks from Gaddafi’s military that were hit last month by a NATO airstrike. Rebel fighters have since destroyed the green arch that marked the western entrance to the city, worried it was being used as a target.

“Now it’s a timeout that seems to have been imposed on both sides,” Hassi said.

The last direct combat was a week ago, in Brega, he said. Now Gaddafi’s forces are inside that city, and the rebels remain on the outside. “We’re patiently waiting.”

At the hospital, Suliman Refadi, 41, a volunteer doctor from the eastern city of Darna, padded along the empty, fluorescent-lit hallway in blue scrubs. For 56 days he has treated gunshot and shrapnel wounds, and counted the dead from the battles in Ajdabiya and farther west.

“We are ready for an emergency,” he said. “Now it’s completely calm and we have no patients.”

Military commanders have instructed ambulance drivers not to go more than 20 miles outside Ajdabiya, where a gas station marks the midpoint between the city and Brega, worried they would take fire from Gaddafi’s forces. The only recent patients suffered from appendicitis and heart palpitations. Only one rebel, with a shrapnel wound, has been brought in during the past 10 days.

The rebel army has ordered its fighters not to move until they get new orders, the doctor said. “Two weeks ago there was no control and now finally the Libyan National Army is taking control,” Refadi said.

The fighting will be even bloodier when it resumes, he said. “This is the calm before the storm.”