The children were flying kites in Kabul yesterday, little squares of homemade paper, one of them dancing in the thin breeze over the derelict hulk of the headquarters of the Taliban's religious police. When the children had gone to bed the night before, kites were a forbidden joy. When they got up, the kite-haters had vanished.

Yesterday a city of one million souls woke from a bad dream that had lasted five years. In Kabul the Taliban were not a screaming nightmare like 20th century dictators but a nagging, vicious, nonsensical head fever, where men were to despise women, daughters were to be illiterate, and drums and kites were evil.

By dawn it was all gone, as if the sunlight had chased it away, and the people of Kabul were looking dazed at each other, wondering what was more strange: that they had been liberated before the liberators arrived, or that they had allowed themselves for so long to be subject to such a bizarre, ephemeral regime.

And the liberators, the Northern Alliance, did arrive. In jeeps and trucks, but not in great numbers, and with tanks left at the city limits. Not so many yet as to cause dread that the fighting might begin again, nor to dim the happiness at re-found freedom.

It was enough to remind the people of Kabul that they have new masters. After its scarcely believable four-day sweep through the country, the Alliance left the bulk of its troops on the edge of the capital, but took control of Kabul's key buildings, and bussed in a bespoke police force.

The fear of the new regime is not far below the surface of delight at the end of the old. "They say the Taliban beat first and asked questions afterwards," said one woman. "They say the Northern Alliance asks questions first and beats afterwards."

By midmorning young Akmal was selling previously outlawed Persian and Indian song compilations from his boot just outside where the religious police used to be based. A few days ago his friend Hasibullah had to bribe his way out of a two-month jail sentence for selling cassettes like these.

Men forced to grow beards were flocking to buy razors. "I feel reborn," said Mirvais, a communications worker, whose wild black chin piece was, indeed, a burden. "My greatest wish was not to have to wear this beard."

As the day went on, greater taboos were being breached. Women's faces began to appear on the streets as the infamous burkas were lifted by a daring few.

In a Soviet-style flat close to the centre, Nadera, a 35-year-old kindergarten teacher, sat unveiled among the men on the floor mats in the family lounge - although she, and her daughters, wear headscarves at home - and described the absurdity of the enforced burka.

"Your head hurts and your eyes hurt from the limited vision," she said. "It was very difficult to walk without falling over, especially on the stairs, and sometimes you'd fall over while you were carrying the children."

A couple of days after the Taliban took Kabul, they announced that all women would be banned from working, and girls would not be allowed an education.

Nadera, who had worked at her local kindergarten for 15 years, has not been to work since. "The Taliban gave women no rights, only the right to stay at home," she said.

"Now we'll go to work again, and our children will go to school."

Her daughter is eight. "I'm educated, and my daughter is illiterate. It's terribly painful. I teach her a little bit at home, but of course it's not the same."

Nadera did not dare complain to the Taliban but her husband did protest about the fact she was owed three months' salary from the kindergarten. They seized him and shaved his head with a dry razor.

Her husband is a television cameraman. Since the Taliban banned TV and locked up the cameras, he has done little work for the past five years either.

One of his colleagues at the Kabul Broadcasting Centre, the head of planning Shah Mahmoud, described his first lesson from the Taliban. Soon after they took the city he was walking near his home, wearing trousers and clean-shaven, when he saw a group of Taliban men beating a woman with a length of cable. The woman was carrying a baby and screaming: "Oh God! I've done nothing wrong!"

The woman, who was taking her sick child to the doctor, had fallen foul of one of the Taliban's early decrees, that woman should not leave their homes under any circumstances.

"I was astounded, and outraged that they'd hit her," said Mahmoud. "I went up to them and asked them what right they had to do such a thing. They started to hit me, and two of them grabbed my hands from behind." Mahmoud managed to struggle free and ran away. He resisted no more, so the decrees kept coming.

"I didn't want to wear a beard. They said it was necessary. I didn't want to wear a turban. It was the law. I didn't want to paint my eyes. They said you have to paint your eyes. That one came right from the office of Mullah Omar."

Asked about the lack of reprisals, and his own collaboration with the Taliban - he worked for the station while it was putting out Taliban propaganda before it was silenced by US bombing - he recalled the circumstances in which the Taliban had taken over.

Fighting between rival groups armed with heavy weaponry in the early 1990s left terrible scars on the city - at least one major street is still in ruins - and on the people. "At that time of military action I lost everything," said Mahmoud. "House, property, everything. We were refugees, moving from one place to another. We didn't have enough to eat or wear. We couldn't emigrate. We had to stay here. What could we do? The majority of people - myself included - were obliged to work with the Taliban, even though our hearts were not with them. Islamic law worked here: anyone who was on the side of the Taliban and surrendered will be forgiven."

Most people in Kabul claim that all the true Taliban have left the city. But there were collaborators and collaborators. What would Mahmoud do if he discovered that the person who had beaten him and the woman with a cable was still living in Kabul?

"I would destroy him," he says. "By any means possible."

After talking to many residents of Kabul yesterday, and to Northern Alliance commanders, there seems to be no mystery about the Taliban's flight. As soon as word reached the city of the Alliance's breach in Taliban lines to the north, the Taliban knew the game was up.

"You know, starting in Mazar-i-Sharif, they suffered a collapse of morale," Yunus Qanuni, the Alliance interior minister and head of the Alliance-appointed commission responsible for security in the city, told the Guardian in Kabul. "Their equipment was destroyed and their fundamental strength lay only in their front line. Once the front line was destroyed, they had nothing left."

Baratullah, a shopkeeper, said he had been on the north side of the city on Monday at 2pm when he heard the sound of Alliance artillery. "It became obvious then that the Taliban were preparing to leave the city," he said. "I saw their tanks, their anti-aircraft guns, and I was astonished. They were moving south."

Early yesterday morning Abdullah Haqim, a restaurant owner, said he had foreign Taliban customers the previous evening, as arrogant as ever. "Not all the Arab Taliban knew they were supposed to leave," he said. "They were sitting here, in this restaurant, last night. We were listening to Radio Iran and they shouted at us to switch it off."

According to Baratullah, at 8pm on Monday night, local Taliban officials began a belated revolt against their foreign sponsors. They broke into the main Kabul jail and freed more than 1,000 prisoners.

By that time, however, the Taliban flight was well under way. One Kabul source said he heard only 90 minutes after the Alliance offensive began that senior officials were clearing out.

The Taliban left few foreign fighters behind, alive or dead. Eight corpses lay in Shar-i-Nau park, not far from where the Taliban had hidden petrol tankers under the trees to protect them from US bombing. The dead were said to have been foreign Taliban killed by the mini-revolt - one of the few signs of anything resembling reprisals.

Not far away was the wreckage of a Taliban pick-up, hit by a US helicopter gunship on Monday night. The gunship caught the car square on the crossroads. The bodies of the occupants, scorched and broken and turning grey, had been dragged a few yards away where a crowd of excited Afghans stood round, laughing at the human meat.

At an abandoned military base, local vigilantes were claiming to have captured a Taliban fighter. They had Yasin Sultan, from Multan in Pakistan, locked up in a tiny room, his wrists bound tightly behind his back, his bare shoulder showing where somebody had roughly seized his tunic.

Sultan, 20, who spoke none of the Afghan languages, only Urdu, was a slight, fresh-faced, terrified man. He claimed he had only come to Kabul the previous night and was trying to visit his brother, a Taliban fighter. "I didn't know the city was going to be taken," he said. "Maybe they'll take money to let me go."

Outside, Massoud, one of the men who captured him, pointed to an RPG rocket-launcher and three rockets leaning against a wall. "He was in a house, he was seen trying to climb over a wall to get away, they searched the house and found these weapons."

Massoud said the man would eventually be judged by an Islamic court. But there are no courts in Kabul now, no government, and only the most uncertain of laws.

Soon after dawn the main road into Kabul from the north was busy with cars and trucks, laden with troops and police, driving through the previously Taliban-held part of the Shomali plain, reduced by US bombing and Taliban scorched-earth policy to a wilderness of mud stumps and blackened vines.

Closer to the capital there were dead Taliban on the roads and children shouted: "Long live America!"

To soothe international concerns about its overwhelmingly non-Pashtun make-up, the Alliance was not supposed to be advancing beyond a chaotic self-imposed checkpoint about a mile from the edge of the city.

But the Alliance promise to keep its forces away from the city has turned out not to be very meaningful. It moved quickly to take control of the city's television and radio station, the interior ministry and other key points. Any outside party - the US, the UN - which wants to push for a broad-based government in Afghanistan will have to deal with the Alliance first.

At the security ministry building, the white Taliban flag still flew yesterday morning, and Taliban slogans still decorated the walls. "Truth came, and that which was not truth disappeared," said one.

The fleeing Taliban's seats had hardly cooled, however, before Saranor Kram, of the Northern Alliance, turned up in his Mercedes to claim the deputy security minister's job he held during the bloody destruction of the early 1990s.

Shortly after 1pm, a heavily armed detachment of Alliance guardsmen arrived to claim the old presidential palace. In the afternoon, a team from the tiny local radio station in the Alliance town of Jabal os Saraj arrived at the capital's radio and television centre to give Kabul Radio the appropriate Alliance spin.

Yunus Qanuni was at a military base across the road, where Alliance police and security service personnel were drilling.

He insisted the Alliance had kept its promise to keep its forces out of the city. Asked how the Alliance would work with potential partners in a future all-party Afghan government, such as the former King of Afghanistan, he said: "The King has no army."

As Qanuni was speaking a lorry drove past the gates of the base, a cheering mound of humanity swaying from it to the deafening beat of Indian music. A silver stream of bicycles followed, the heads of the riders lifted and happy. Yesterday was too early for the people of Kabul to anticipate the souring of liberation.