TRIPOLI // A year ago, a Libyan design student named Redwan El Ejlase threw a birthday party in a chic Tripoli café for his close friend, Mohamed Kattaf.
They welcomed guests and ate chocolate cake. Neither could have imagined their imminent separation by a war to overthrow a dictator who called himself, perversely, “Brother Leader”.
The swirl of events, which saw Muammar Qaddafi's keen sense of political theatre fail him after 43 years in power, pulled apart Mr El Ejlase, Mr Kattaf and others who attended the birthday party.
Some backed rebellion, one found himself serving Qaddafi's regime and others fled. At least one was killed. What happened to them - their fears, the hopes, their betrayals - is the story of Libya in a year like no other.
It was on February 17, as he was watching television, that Mr El Ejlase first saw scenes of Libyans rising up against Qaddafi.
"When they pulled down Qaddafi's flag, it was like something from a dream," he said, recalling the images from eastern city of Benghazi, where the uprising began.
Both 22 and wept up by the fervour, he and Mr Kattaf, decided to join rebel forces together in the Nafusah Mountains, west of Tripoli.
When government soldiers came looking for Mr Kattaf, he had no choice but to leave immediately. He fled Tripoli for Tunisia, then made his way back into Libya and to rebel-held Nalut.
Mr El Ejlase stayed in Tripoli, where he and other university students formed a secret group to wage "psychological warfare" to discredit regime propaganda.
In a university bathroom, he scrawled Qaddafi's televised pledge not to leave Libya - "ana gaad hina" or "I will stay here" - above a toilet with an arrow pointing downward.
He and other members of the secret cell also hung specially rigged rebel flags in windows.
To the stunned eyes of onlookers who thought the regime impregnable and all-seeing, the rolled-up flags unfurled when a lit cigarette bundled into the thread encircling them burned through.
Other activities went beyond dirty tricks. A Filipina friend of Mr El Ejlase's used her passport to help him enter the Radisson Blu Hotel. There he used satellite internet to send photos of military sites to a friend abroad, who he said sent them to Nato for air strikes against regime targets. Detection by the regime might have ended with Mr El Ejlase’s death.
While Mr El Ejlase carried out acts of sabotage against the regime in Tripoli, Mr Kattaf was learning to fire a gun.
With other rebels, he lived in a converted classroom in a school in Nalut and practiced marksmanship by shooting at pictures of Qaddafi – a vain man whose image abounded..
"The first time I fired a gun, the sound startled me. I didn't like guns," Mr Kattaf recalled.
His first shot hit Qaddafi's image in the cheek. "But I was aiming for his forehead."
With Qaddafi's opponents showing no signs of relenting under his threats and blustering, his regime grew more desperate - and brutal.
Weeks earlier, Talal Giuma had been celebrating Mr Kattaf’s birthday. Now the 30-year-old marital relations counsellor watched as three cars pulled up in Tripoli’s Green Square to help put down a protest.
Armed men got out of them. Mr Giuma fled the plaza and then called his friend Ayman Toumi, 29, who he thought had made it out of the square with him. Another friend answered Toumi’s phone: “Ayman is martyred.”
Toumi had been shot in the head by pro-regime thugs firing wildly from their car. Mr Giuma went to the hospital, where he found Toumi's family weeping.
"I helped put him in the freezer," he recounted. "He was smiling."
As more wounded protesters were wheeled into the emergency room, Mr Giuma stayed to help. The hospital, however, became deadly like the square.
During the night, regime gunmen stormed though the corridors and shot some patients in their beds.
"It was assassination," Mr Giuma said.
Later in February, a young computer engineer named Anwar, another attendee at Mr Kattaf's birthday party, received a phone message summoning him back to his former job at the state cyber-crimes unit.
Anwar, 23, who asked that his surname not be published, ignored the call. The next day, yet another call. Ignored again. "But the third day they came to my house," he said.
Anwar was put to work at a state security compound scouring confiscated phones and laptops for data.
The photos he saw indicated that most of the equipment belonged to foreigners.
At first, Anwar enjoyed the work. "I was handling new things like sim cards. It was a challenge."
In late March, however, Nato began air strikes. Anwar and other engineers were ordered by their boss "to die as martyrs".
Soon militiamen commanded by Qaddafi's son, Khamis, started ushering bound and blindfolded prisoners into the compound for interrogation.
"They called them 'rats' and said they worked for Nato," said Anwar, who was ordered to examine the prisoners' phones and computers as the detainees were beaten beside him.
Appalled at what he was told to do, he requested a transfer, which was granted. In another government office, he built pro-regime Facebook pages. He also secretly sent videos of anti-regime protests to contacts abroad, he says.
Later, after Qaddafi was gone, his friends would shun him. "They think I was with Qaddafi," he said.
In late June or early July, not long after Anwar turned his energies to Facebook pages, Mr Kattaf killed for the first time.
It was his first battle, in a place called Zaia. The insurgents sprayed the village with heavy machine-gun fire. When they reckoned that government forces had been killed or driven away, the rebels inched towards the hamlet. Mr Kattaf and several others spotted an enemy soldier and hid behind a wall.
The man peered around the corner of a building, decided all was clear, and began to walk away. Then everything happened very quickly.
Later, Mr Kattaf would describe it in pained, clipped phrases: "We said, 'Surrender!' He didn't. So we shot. He died."
In Tripoli, Mr Giuma, the marital relations counsellor, got an order from Benghazi: "Start building an army."
After the crackdown in Green Square on February 20, he and his friends started passing information to Nato about the movements of Qaddafi's forces.
With the order from the rebel capital, he contacted Ayman Toumi's family and, using code names, began stockpiling pipe bombs, black-market Kalashnikovs and first-aid supplies.
On the third Saturday in August, Mr Giuma and a friend circled the streets of Tripoli in a borrowed garbage truck, distributing arms.
That night, the uprising in the capital began. Within a week, Qaddafi's regime had collapsed.
One evening last month, Mr El Ejlase was back at the Radisson Blu Hotel, looking at photos on his laptop of that long ago birthday party.
There were Ali and Jeng, Filipino hospital workers who fled during the war. There were Anwar and Mr Giuma. And there was Redha Naji, shot dead at 22 by pro-Qaddafi snipers as Tripoli fell. "I saw a photo of him on Facebook and someone had written 'martyr'," Mr El Ejlase said. "I thought it was a joke."
But when he went to Mr Naji’s street he found it named for “The martyr Reda Naji” in red graffiti.
Finally, there was Mr Kattaf. The two young men had reunited at the hotel in late August, after Mr Kattaf and other rebels had fought their way into Tripoli. His friend had clearly suffered. He was nearly deaf from the bullets and bombs. And confused.
"I snapped my fingers by his ear, and he said, 'Who are you?'"
Mr El Ejlase volunteers at Tripoli's central hospital and hopes to complete his studies in design. He also mulls over a career in government.
"As Libya is now free, maybe I'll become a minister," he said. "Tripoli was once called the Bride of the Sea, and could be beautiful again."