Public schools here are little more than warehouses, grim concrete shells lacking libraries, sports facilities, sometimes even teachers. Classes have as many as 60 students. But the children of Pakistani military officers almost certainly are not among them. For them, there is Army Public School O Levels.

Geared toward preparation for the competitive O Levelexams required by British universities, the handsome school is an educational showpiece whose computer, physics and biology labs would not seem out of place in an American suburb. Teachers make three times as much money as their public school counterparts.

The officer class in Pakistan has always had a strong sense of entitlement stemming from its dominant role in defending the country and in running it, directly or from behind the scenes, for most of Pakistan's 55-year history. It has been aided in that regard by corrupt and incompetent civilian governments, the most recent of which was toppled in 1999 by Gen. Pervez Musharraf in a coup d'etat that many Pakistanis greeted with relief.

Three years later, though, a backlash has set in, as the military's accumulation of lavish perks, and its growing encroachment on civilian institutions and the economy, cause many Pakistanis to ask whether uniformed leaders -- like the corrupt politicians they replaced -- are confusing the national interest with their own.

Why else, they wonder, would officers' children at the seven-year-old army school enjoy basketball courts, fields for cricket and soccer, even a petting zoo stocked with ducks and deer.

"The army considers itself a privileged class," Khayyam Durrani, a retired officer who is principal of the school, said with a smile. "The fact is that the actual rulers in Pakistani society are the army people, so they want their children to go to a privileged institution."

But among the critics of the military's perks are members of Pakistan's newly reconstituted parliament, which convened last week after last month's elections for the first time since the military takeover. Lawmakers and party officials have vowed to halt what they call the militarizationof government, economic and educational institutions that they say has accelerated under Musharraf's rule.

"I think this is one of the biggest issues that is confronting civil society in Pakistan," said Raza Rabbani, secretary general of the Pakistan People's Party, headed by former prime minister Benazir Bhutto, who lives in self-imposed exile. "Never before has the militarization of Pakistani society been as complete as it has since" Musharraf seized power.

Some critics go a step further, accusing the military of deliberately stoking tensions with India, particularly over Kashmir, to justify its hold on resources and power. "Peace would be a disaster for the military," said Pervez Hoodbhoy, an anti-nuclear activist and MIT-trained physicist who teaches at Quaid-i-Azam University in Islamabad.

There is no denying the military's dominant role in Pakistan. The military owns the best farmland and several of the largest industrial conglomerates. Retired or active-duty military officers run the ports, postal service, electric utilities, sports federations, telecommunications authority, culture ministry, mineral development agency, anti-drug police, railroads, civil aviation authority, national shipping company and Pakistan's biggest steel mill. They hold top administrative posts at the best universities. Many ambassadors are retired officers.

While Musharraf has vowed to restore "real democracy," he also has tried to institutionalize the army's role in politics with recent constitutional amendments that he says do not need parliamentary approval. One of them creates a new National Security Council to oversee parliament. The council, chaired by Musharraf, will include the military service chiefs as well as the chief ministers of Pakistan's four provinces. Another amendment gives Musharraf the power to dissolve the assembly.

Opposition lawmakers, among them leaders of an alliance of fundamentalist Islamic parties that has emerged as a main power broker in the new assembly, have vowed to roll back the changes, although they are unlikely to muster the two-thirds majority needed to do so.

Musharraf saw to that when he barred the country's two main opposition leaders -- Bhutto and former prime minister Nawaz Sharif, who also lives in exile -- from participating in the elections on corruption grounds. In doing so, he paved the way for a pro-government party, the Quaid-e-Azam faction of the Pakistan Muslim League, to claim the largest share of seats, although the party fell short of the simple majority needed to form a government on its own. The party finally succeeded Thursday in cobbling together a narrow majority that elected Zafarullah Khan Jamali, a career politician from the province of Baluchistan, as prime minister.

The Bush administration, which considers Musharraf a close ally in the war on terrorism, has expressed concern about the constitutional amendments but has generally tried to stay out of the civil-military debate in Pakistan. Last month, the State Department described the Oct. 10 elections as an "important milestone" in the restoration of democracy in Pakistan.

Government officials say the military's preeminent role is justified by several factors. They cite in particular the looming threat of India, with its lopsided advantage in population and resources, and the dismal record of civilian politicians who plundered Pakistan's wealth and drove many of its institutions to ruin. Any special privileges that accrue to the officer class, they say, are aimed at compensating them for low salaries relative to those at private corporations and rewarding those who have dedicated their lives to protecting the nation.

"Pakistani forces are not some sort of peacetime army," said military spokesman Brig. Salaut Raza. "We shed our blood for the nation. Pakistan armed forces, we are living in a peculiar situation -- our next-door neighbor is our enemy. Already we have fought three wars."

The military's primacy is reflected in the national budget, about 22 percent of which goes for defense, compared with 16 percent in the United States and 15 percent in India, according to the CIA World Factbook. The high proportion of defense spending has come at the expense of social programs in this impoverished nation of 147 million, which spends 42 percent less per capita on health care than other countries at the same income level, according to the World Bank.

Whatever the hazards faced by Pakistani officers, they also inhabit a kind of parallel universe that insulates them from the hardships endured by other Pakistanis. Many live with their families in manicured, colonial-era "cantonments" with good schools, well-maintained roads and reliable power and water supplies.

One of the fanciest clubs in Karachi is the Defense Housing Authority County and Golf Club, a sparkling new facility with lush fairways, a two-story driving range and a gracious stone clubhouse overlooking an inlet of the Arabian Sea. Active-duty military personnel can join the club for an initiation fee of $16, compared with $9,166 for civilians, according to the club's fee schedule.

Under an arcane point-based system that dates to the British Raj, the military also rewards its senior officers by allowing them to purchase agricultural and urban land from the army's vast inventory of real estate at prices far below market value. A number of these properties are grouped into "defense societies" in tony suburbs of Karachi and other major cities. The societies are administered by the Defense Housing Authority, which ensures the provision of municipal services. Officers who acquire such land often develop it as rental property or sell it for hefty profits.

One of Pakistan's most coveted addresses, for example, is the blandly named Army Housing Scheme II, which is built on the site of an old antiaircraft battery in the upscale Karachi suburb of Clifton. A gated community protected by paramilitary troops, the development consists of spacious, Mediterranean-style villas grouped around a playground and an elaborately landscaped Japanese-style garden. Nearby are clothing boutiques, jewelry stores, restaurants and a yoga studio.

Property owners in the neighborhood include several army corps commanders, Interior Minister Moeenuddin Haider, a retired general and Musharraf, who rents his large stone house to a German business executive and his wife for $1,416 per month, according to a local real estate agent. Musharraf owns seven pieces of property in all, including six residential plots and a piece of agricultural land, according to the asset list he disclosed shortly after seizing power.

Raza, the military spokesman, said he would not comment on specific cases. But he defended the reward system, saying the army was in most cases turning over "barren" land that would not have been developed otherwise. He also said the program helps compensate for low salaries and pensions. "It's part of the package," he said.

Individual perks aside, the military presides over a network of businesses and industry that ensures it a dominant role in the economy. In the 1980s, for example, the military government of Gen. Mohammed Zia ul-Haq set up the National Logistics Cell, which ferried supplies to Islamic rebels fighting to oust Soviet forces from Afghanistan. The organization is now the largest freight company in Pakistan, grabbing business from railroads and private trucking firms, according to Hasan Askari Rizvi, an academic and author who has written widely on the Pakistani military.

In a similar vein, the military after independence established several charitable foundations to look after the welfare of retirees. They have since grown into huge business empires. The army's Fauji Foundation, for example, is Pakistan's largest industrial conglomerate with assets of $133 million in 1996, including sugar and cereal mills, cement plants, fertilizer factories and a power project, according to Rizvi.

Installing men in uniform in civilian businesses and institutions did not begin with Musharraf. In 1980, Zia established a 10 percent quota for military personnel in civilian government jobs. But Musharraf, by all accounts, has taken the process further than his uniformed predecessors, dispatching military "monitoring teams" to key civilian agencies and replacing top officials with senior officers. He contends that corrupt and incompetent management by civilians left him little choice.

Durrani, the principal of Karachi's army school, acknowledged that he is troubled by the military's gradual encroachment on civilian institutions. At the same time, however, he has big plans for the school, including a new auditorium and perhaps even a swimming pool.

"I just have to convince the general," he said, referring to the school's chairman. "If the general wants to arrange for funds, he can."

Special correspondent Kamran Khan and researcher Robert Thomason in Washington contributed to this report.

Zafarullah Khan Jamali, a 58-year-old career politician from a pro-government party, was chosen by the Pakistani legislature yesterday as the new prime minister. Story, Page A30.At a Karachi country club and golf course used by military personnel, a clubhouse near lush fairways overlooks an inlet of the Arabian Sea.