An 80-foot brick tower, built by the British during the few years that they managed to subjugate the tenaciously independent Afghan tribesmen, sits on the mountain range separating Kabul from the southern part of the country. It serves as a giant signpost for travelers making their way on foot toward the capital.

After four hard days of marching from the Pakistani border, the small group of anti-Soviet insurgents that I was accompanying finally reached this monument to 19th century imperial imagination.

There we could see, far below, the sprawling metropolis of Kabul, encircled by a patchwork of green and golden yellow fields.

Like the British before them, the Soviet troops stationed in Kabul are discovering the difficulties of imposing their authority on Afghanistan. Long frustrated by guerrilla dominance of the countryside, the Soviets' control increasingly is hampered in the capital as well, where they have based the bulk of their forces.

The insurgents, or mujaheddin, have stepped up their activities around Kabul and have begun this year to stage attacks at night in the heart of the city. The capital's population has doubled because of an influx of refugees, leading to massive overcrowding and soaring rents. The Moscow-backed government of Babrak Karmal apparently has failed to win popular support through political means and is relying instead on a major security clampdown.

This assessment is based on conversations with dozens of Kabul residents who sympathize with the guerrillas and on firsthand observation of the countryside between the Pakistani border and the capital. I spoke with the Afghans in homes on the outskirts of the city, often over supper. During a visit last year, I was able to go into the city itself, but this time I entered it only on two nighttime raids with the guerrillas.

The Soviet Union sent about 80,000 troops across the border into Afghanistan three years ago to install and prop up the Babrak regime, and since then Kabul has played a central role in Soviet strategy. After securing the capital, the Soviets hoped to whittle down opposition in the countryside.

The plan is not suited to Afghanistan, however, where Kabul throughout its history has played a relatively peripheral role. The nation's mountain ranges restrict communications, and the ethnic kaleidoscope of tribal and religious sects limits central government authority.

Virtually no Soviet presence is noticeable in Afghanistan south of the capital. In valley after valley in Paktia, Lowgar and Kabul provinces, local religious authorities or mujaheddin leaders manage civic affairs. They settle disputes among families over land or grazing rights, and the guerrillas in some cases have set up schools.

Nevertheless, the Soviets have made their presence known in other ways. Virtually all of the villages that I visited bore scars of rocket attacks by helicopter gunships. Gaping holes were seen in mud houses, where splintered beams stuck through the walls like broken ribs through a shattered chest.

The Soviet attacks have driven away residents from many areas. The Tezin Valley 30 miles east of Kabul, which teemed with more than 400 families last year, was deserted apart from about 100 mujaheddin. Only a few of the previous residents were killed in an eight-hour raid. The rest packed as many belongings as they could and left.

The exodus of Afghan refugees to Pakistan has been fully reported, but many inhabitants of Tezin opted for the shorter, if less publicized journey up the road to Kabul. Thousands have sought sanctuary in the capital, and Kabul is estimated now to shelter well over 1 million people, compared to about 600,000 three years ago.

New suburbs have sprung up, with many people living in canvas tents, and the streets have become more crowded. When asked about changes in the capital, inhabitants nearly always mention the increase in population first, and many spoke of it as though a major disaster had befallen them.

One house that cost 3,000 afghanis to rent for a year in 1980 today fetches 15,000 afghanis, or about $250.

Such a change seriously reduces the standard of living in a city where the average yearly income is about $600. In addition, some residents observed that the crowding has made people more tense and less forthcoming toward each other.

Prices for food and other goods also have risen sharply. For some items, they have doubled or trebled in the past year.

The mujaheddin are proud of their hospitality and do not allow correspondents traveling with them to pay for anything. At the end of the trip, however, the visitor is expected to offer the group something substantial, like a sheep or a goat, and the full extent of inflation became clear to me at that time. Last year a sheep had cost 700 afghanis, but one now sells for 1,500 afghanis, or about $25.

"People are openly questioning how they can survive," said one Kabul resident.

As economic difficulties grow, the war itself draws ever closer to the capital. The street demonstrations, distribution of resistance leaflets and chanting of Allah-u-akbar, "God is great," from thousands of rooftops at night have subsided. But the resistance has used the steady influx from the provinces to infiltrate insurgents into the city, and the urban guerrilla attacks first waged by left-wing and Maoist opponents of the regime steadily have grown in scale.

Senior members of the ruling party, Afghan Army officers or sympathizers are assassinated every week. Movie theaters and restaurants known to be frequented by government officials are bombed, and Soviet offices, particularly the embassy, regularly are targets of gunfire from passing cars.

The insurgents simultaneously have built up their forces operating at bases around the capital, which has become one of the focal points of the resistance. Arms have poured into the area, and experienced commanders like Abdul Haq were sent from the eastern provinces to organize and lead the insurgents.

The buildup has been so effective that, as I witnessed on two occasions this year, the insurgents are able to launch night attacks on military posts and government installations inside the built-up urban metropolis.

The escalation has elicited a strong response from the Soviets. Roadblocks are set up all over the city, and house-to-house searches are staged almost daily. Special efforts have been made to build up a more effective and widespread internal security service, according to Afghan sources, causing a widespread feeling of insecurity and fear among the city's population.

"My papers are in order, but I have been picked up on three occasions this year," said a student completing his last year in high school.

Police and security forces also use press-gang tactics to round up new conscripts for the badly depleted Afghan armed forces. Under regulations issued this summer, any man between the ages of 15 and 45 is eligible to be called up, recalled or simply picked up on the street to do military service, which now lasts four years. It is not a prospect that many have relished, and it has prompted many young men either to leave the city or to go into hiding.

"Despite my exemption papers, I have been picked up on two occasions now," said a 40-year-old factory worker living just outside Kabul. He added that he had been freed after contacting a friend in the police service.

A first-year university student said, "When the course started in August, there were 35 of us. Some have been picked up or arrested, but most just don't dare to come anymore. There are only 12 of us left."

The tightened security appears to be the government's response to the failure of two years of political initiatives after the Soviet invasion to broaden support for Babrak's regime. During that period, security was kept at a minimum in Kabul, belief in Islam was encouraged and special efforts were made to expand industry and welfare in and around the capital. Lavish offers of regional autonomy and financial aid were proposed to tribal leaders.

The vast population influx, growing unemployment and soaring inflation appear to have helped to prevent any upsurge of popularity for the government, however, and support for Babrak remains limited to the ruling People's Democratic Party.