When the lights first flickered then went dead, along with the television and computers in the Guardian's office in the Flatiron district, shortly after 4pm on Thursday the immediate assumption was that it was just our block.

People in the building opposite waved cheerily from their windows with all the gusto of a bunch of schoolchildren who suspect they may have just been given a surprise afternoon off.

Then the phone calls started coming and the nerves started jangling. It wasn't just the block but the entire city and beyond. New York's streets, as office buildings disgorged their workers, were suddenly packed.

The area below the Guardian on Broadway, toward Union Square, felt like Midtown, with people spilling into the roads. The traffic lights were out but drivers were managing to negotiate the grid system with good grace and few hoots.

Outside electronics stores, people had gathered in large crowds to listen to battery powered radios. It suddenly felt as though we had stepped back a couple of decades. Mobile phone networks were down and long lines stood in front of payphones, many of which don't work from neglect. People also walked down the street with transistors stuck to their ears.

New Yorkers are ever enterprising and were already out selling flashlights, batteries, radios and flip flops - the uniquely New York trend of women wearing trainers to the office, where they changed into their heels, is long gone.

For the thousands of people trapped in lifts and subways it must have been a terrible experience. The same can be said for those who had to walk for hours to the outer boroughs or those who simply couldn't get home at all, and slept on the street or in hotel lobbies.

But for many people who live in Manhattan, once it had become apparent that terrorism was not to blame, New York took on a slightly surreal carnival atmosphere.

As the sun began to go down, people started to gather in small groups outside their buildings or on stoops with beers and candles. It was, after all, too hot to sit inside. Perhaps too there was a little excitement from the trepidation of what was to come.

And New Yorkers have a finely tuned appreciation of the bizarre situation. Some had picnics, others even lit gas-fired barbecues on the sidewalk. The law prohibiting outdoor drinking was, for one night at least, ignored.

It reminded me of another extreme day in the city when it was immobilised by snow and people skied down the avenues. Restaurants and shops were closed. Lesson one from the blackout was that it is wise to have more in the fridge than vodka and beers. But many of the bars had opened and were lit with candlelight. With much of the city shifted to the sidewalk, smokers looked defiantly at home.

As is commonly the way in adversity, people even spoke to strangers, although New Yorkers in general belie their tough reputation and are far friendlier than Londoners.

Impromptu parties gathered around musicians in the street - bongo players, fiddlers and a belly dancer attracted whooping crowds in Thompson Street in the West Village.

In Washington Square Park up to 100 people were dancing to drummers and chanting or cheering, watched perhaps by twice as many onlookers again. A group of dozens of cyclists circled the park at one point with their dynamos whizzing through the air like fireflies before heading off in the direction of the East Village.

The best view was from one of the many rooftop parties that took place across the city. If your building was high enough you could pick out dozens of dimly lit parties pock-marking the cityscape. Art deco buildings rose out of their surroundings like massive abandoned Aztec monuments.

The other thing that you don't see very often in New York because of the glare of the city is the stars, but they were on full show that night. It was also strangely quiet. Although you could hear the sounds of revellers, the hum of the city and the backdrop of cars was gone.

There were very few vehicles on the road, adding to the romanticism that appeared to have gone to many people's heads. A couple kissed passionately on the middle embankment of West Houston Street - normally a busy freeway on both sides, but temporarily a dark wide-open space flanked by the city on both sides.

Walking down some side streets was a little nerve racking. But more for the fear that an unforeseen rat might run across flip-flopped feet than anxiety at being attacked.

By morning the streets were filled with rubbish - like the aftermath of a street party, which, after all, is what had ensued, at least in this part of New York.

As the day progressed power gradually worked its way back down the city. The parts with electricity appeared immediately back to normal. A few blocks away, the stores were still closed and the shopkeepers sitting outside waiting to begin business once again.

In a little over 24 hours it was over for most of the city. As the power came back on people cheered in the streets. But it was 24 hours that will be remembered, albeit very differently by different people, depending on how lucky they were.