Libyans are free to text, call and blog again after a long telecommunications blackout, in a powerful symbol of how the rebels are ringing the changes.

Libyan rebel sympathisers in Tripoli used Twitter and Facebook to give anti-Gaddafi forces the map co-ordinates of pro-Government snipers and heavy artillery as the battle for the capital unfolded.

The episode demonstrates how important an issue the control of new media has been in the battle for Libya, with the rebels apparently making a concerted effort to wrest control of mobile phone and internet resources before attempting to attack the state television station's Tripoli headquarters.

Members of the Free Generation Movement, a dissident group who have been making secret broadcasts and podcasts from inside Tripoli throughout the six-month uprising, posted the map references of places where they said loyalist gunmen were holding out as the rebels swept into the city on Sunday.

One typical Facebook message, posted on Sunday, said: "Snipers on rooftop of tallest building at junction of Jraba Street and Ras Ahsan. Coordinates to the Location of Snipers in Benashour 32°52'12.28"N 13°12'22.36" E".

The rebel sympathisers appeared to take advantage of a window of opportunity after internet access was unexpectedly restored in Tripoli late on Sunday.

By Monday the website of the state-controlled service provider Libyan Telecom and Technology (LTT) was carrying a message in Arabic that read: "God is great ....We congratulate the Libyan people on the fall of oppression and tyranny, and we urge the people to celebrate and preserve public property. Libya one tribe."

Local bloggers said internet access had been disrupted for months before suddenly reappearing on Saturday, only to be blocked once again the following day before finally reappearing as the tide turned against Gaddafi.

Renesys, a US company that analyses trends in worldwide internet traffic, said the fluctuations could have been a sign of conflict within LTT, with someone trying to reactivate the service locally, only to have it switched off at national level, before the rebels finally took control of online access.

Phone network hijack

A key tactical turning point in the uprising against Gaddafi was the moment when the rebels hijacked the dictator's mobile phone network Libyana in a daring piece of technological warfare.

State telephone networks shut down in February in a bid to disrupt the growing rebellion, reducing the rebels to using different-coloured flags to signal to each other on the battlefield.

But in April, a US-educated telecommunications engineer called Ousama Abushagur took a team of technicians to Benghazi along with a stash of satellite equipment paid for by donors in the United Arab Emirates, Qatar and Saudi Arabia.

They hacked into the infrastructure Gaddafi had created to set up a network called Free Libyana, which Mr Abushagur said restored phone coverage to 750,00 people in rebel-controlled areas in the east of Libya. Senior military commanders began to use the limited international coverage to contact foreign governments.

William Hague said in April that mobile phones and other telecoms equipment had been some of the first hardware given to the rebels by Britain in response to pleas for international help.

If technology helped to co-ordinate the military effort against the regime, it also illustrated the apparent sudden reversal of fortune for the Gaddafi family in the early hours of Monday when many residents in Tripoli received an Arabic text message on their phones from the rebel leadership.

The text read: "God is Great. We congratulate the Libyan people on the fall of Muammar Gaddafi, and we urge them to go out in the streets to preserve and protect the public belongings. Long Live Free Libya."

Both Libya's mobile phone networks had previously been controlled by the dictator's eldest son Muhammad, now reported to be in the hands of rebel troops, and the regime was sending its own texts exhorting people in Tripoli to fight the rebels as late as Saturday.

Muhammad is understood to have surrendered to the rebels moments after giving a telephone interview to al-Jazeera television in which he said his house had been surrounded by guerrillas.

He told the station: "They have guaranteed my safety. I have always wanted good for all Libyans and was always on the side of God," before announcing that the rebels had entered his house and the line went dead.

Local bloggers have said the state-run mobile phone companies formerly owned by the dictator's son have now given all their subscribers about £25 worth of credit in the wake of the takeover.

Please wait while this video loads. If it doesn't load after a few seconds you may need to have Adobe Flash installed.

State TV "in rebel hands"

It was not until Monday afternoon that a rebel spokesman was quoted as saying the headquarters of the state TV channel was under the control of the National Transitional Council.

The broadcaster went off air shortly before the statement.

Increasingly shrill broadcasts in recent weeks culminated in a bulletin at the weekend that saw presenter Hala Misrati brandish a pistol on air and promise to defend the premises of the station to the death. She has now reportedly been detained by rebel forces.

Colonel Gaddafi's voice was last heard on the state channel on Sunday as he called for defiance against the rebels, but the fact that there were no video pictures to confirm his whereabouts fuelled speculation that the dictator had fled Tripoli ahead of the rebel advance.