After three sometimes heady months in office, Alan Garcia, Peru's crusading young president, is beginning to grapple with a harsher reality.

Until early last month, when heavy-handed riot police evicted hundreds of squatters from a Lima shantytown, Garcia had been basking in a media glow, spotlighting him as the freshest, most charismatic South American leader to emerge in years.

But the light dimmed in the tear-gas attack on the shantytown dwellers, who had hoped for compassion from the new populist president. It flickered in another police raid the same week, this one against a sequestered group of political inmates at Lima's Lurigancho Prison. More than 30 prisoners burned to death, barricaded in cells where mattresses were set ablaze.

For the people of South America's third-largest nation, the two police actions were a reminder that old habits in this deprived, troubled country die hard, even with a reform-minded head of state who fashions himself a man of the people.

"We had a honeymoon in August and September, but in October things began to change," said Julio Cotler, director of the Institute of Peruvian Studies.

Indeed, Garcia himself lately has started to season his earlier high-hopes message with a dose of reality. Appearing on television after the riot-torn week, he warned: "We will have painful events put in our path, since we have been left with overcrowded jails and a country full of injustice and demands."

Nonetheless, these setbacks have done little to diminish Garcia's enthusiasm. The 36-year-old president has been in office since July 28, and his left-center party enjoys a majority in both houses of Congress, but he acts as if he still were campaigning.

He often appears on the low-built balcony outside Lima's presidential palace to greet crowds of wellwishers, gathered expectantly for the now-famous balconazo performances. Holding a microphone like a practiced entertainer, Garcia makes announcements or simply talks about whatever is on his mind, always reinforcing the trademark themes of his administration, which boil down to getting Peru moving again after years of economic decline, corruption and political stagnation.

Frequently, too, the strapping, wavy-haired leader impulsively bolts from the palace and, with aides rushing after him, goes off on unannounced jaunts -- touring Lima's slums, for instance, or, as he did at midnight after the prison fight, knocking on the Lurigancho Prison door to conduct a presidential inspection.

"He is a man clearly having a lot of fun being president," remarked Enrique Zileri, editor of the magazine Caretas. "He wants to sample everything."

But more than fun is involved in Garcia's campaign-style presidency. As a senior presidential aide explained, Garcia's many public appearances are considered necessary to sustain his grass-roots appeal, which is the basis of his political clout.

He already has made many enemies. He ordered raids on cocaine traffickers operating in Peruvian jungles. He fired about a third of the leadership of the Lima police force in a "moralization" campaign and removed the chief of Peru's Civil Guard. He dropped hundreds of managers from the bloated payrolls of state-owned firms.

When an alleged massacre of Andean villagers by government troops battling Shining Path -- the Maoist-inspired guerrilla movement -- was reported, he dismissed the head of the joint chiefs of staff and two ranking generals. Cutting military funds, Garcia also confirmed last week that Peru will take only 12 of 26 French Mirage jet fighters originally ordered. "For the price of each plane," the president said, "10 maternity hospitals can be built."

On top of other fights he has picked, Garcia privately has been feuding with influential members of his own party, the American Popular Revolutionary Alliance (APRA), who resent the president's independence from the party machine.

Peruvians, amazed at Garcia's boldness, are beginning to worry that somebody may try to assassinate the young president. Threats against Garcia and his aides have been received on an internal phone line connecting government offices.

Garcia's supporters credit him with reviving hope in the country and establishing a new ethic and discipline in government after the five-year term of his predecessor, Fernando Belaunde Terry, left Peru in despair and poorer than it was 15 years earlier.

Moreover, Garcia's international moves -- particularly his announcement that Peru would limit debt servicing to 10 percent of export earnings -- have received strong nationalistic applause here while raising hackles in Washington.

"He has managed to capture something the continent had been waiting for," said Mirko Lauer, a political analyst, columnist and poet. "He has managed to embody what a decent non-Marxist, democratic, leftist, populist leader in South America should look like."

Impatient with bureaucracy, Garcia behaves like a man in a hurry. Inevitably, such hurried action has produced mistakes. Garcia and his ministers seem to many here to have been doing a lot of improvising. Examples cited by critics:

*In August, Peru rescinded contracts with three U.S. oil companies, demanding that terms be renegotiated in 90 days. But the government was not able to come up with its own new negotiating position until last week, after half the allotted time had elapsed.

*In September, the country ran out of currency after the government slapped limits on foreign exchange. Until more notes could be printed, banks issued special cashiers' checks to serve as substitute currency.

*In October, to spur consumer buying, the government announced a 4 percent wage-tax rebate, an inflationary move that seemed to undercut an austerity plan instituted two months earlier.

But despite a sometimes shotgun approach to problems, Garcia is clear on where he is aiming.

His intention is to "rethink the country's whole development strategy," as he explained in a September interview in New York with Washington Post Co. Chairman Katharine Graham. Instead of trying to build large industrial and utility plants, Garcia wants to redirect investment to smaller farming and social welfare projects and to decentralize the state bureaucracy.

But that is not a short-term proposition. "For a while, you're not going to have increased wealth here," said a foreign economic expert. "You're going to have a redistribution of poverty."

"His basic conception is correct -- to transfer resources to slums and rural areas and pump in public expenditures. The question is whether the managerial experience exists to accomplish all he has set out to do," said Carlos Amat y Leon, director of the University of Pacific Research Center. "How to go from the balcony to reality, that is the question for Garcia."