Updated

War journalist Mustafa Kazemi was trapped in a firefight as heavily armed Taliban insurgents attacked a lakeside hotel just north of Kabul in Afghanistan, killing 18 people — most of them civilians — in an attack Friday.

With bullets flying overhead, he took cover -- and took action in a remarkable way, livetweeting the ensuing hours-long battle. His 140-word notes on Twitter provide a riveting account of a firefight both terrifying and mesmerizing to read.

“Two grenade blasts shrapnels off my head,” he wrote at one point early Friday morning. “A mortar shell landed a few hundred meters away from us,” he wrote later. It was a “dead flat gunfight,” he later noted.

Kazemi, a 26-year-old war correspondent, has worn several hats since graduating from a communications college in India, including working for the U.N., NATO and the Afghan government. In the end, he returned to a career covering battles. Reached by phone at the hotel, still awake after 56 hours or so, Kazemi sounded surprisingly energized.

“In this country, if you want to survive you have to be brave,” he told FoxNews.com.

More On This...

As with the Egyptian revolution in 2011, social media has allowed journalists like Kazemi to cover events in a different way, bringing the reader closer to the events, letting him share information and warn people away from danger much more quickly.

“Twitter would give you the breaking news far before a wire would process it and give it to you,” he said. Social media emerged in his country around 2010, Kazemi said, as television stations aimed to replicate what they saw in Western media -- incorporating Facebook pages and other forms of online communications in reports about breaking events.

He came to this battle specifically to cover it via Twitter, which allows him to connect directly with people.

“This is not something they’re used to here, the violence is horrid. Having [my Tweets] as a piece of factual information -- this is happening, right now -- they appreciated it,” he told FoxNews.com.

Twitter allows him to convey more information in a better way to a bigger audience, he explained.

Kazemi’s gonzo endurance reporting evokes an immediate visceral response in the reader: At one point during what was a prolonged and fierce firefight, he simply keeps tweeting gunshots, gunshots gunshots.

I am using all my Eastern & Western wisdom to make the strongest painkiller tonight. Right now, it's the 53rd straight hour with no sleep.

— Mustafa Kazemi

“Hard to survive today.”

“Bullets flying every side.”

“Oh god gunshot really fierce.”

“Burst of heavy machine gun.”

Fellow journalist Ahmad Mukhtar snapped a photo of Kazemi in the middle of the battle -- hunkered down behind a bunker, a can of Red Bull cast aside. The whites of his eyes are stark as he hunts around on the ground for something.

“I was looking for my tourniquets in case I or any one of my friends got hit. I was looking for them when he took the picture,” Kazemi told FoxNews.com.

Hours later, he remained on site to document the clean up, as bodies were discovered and pulled from the wreckage.

“Another young man was killed with his coke glass filled and not taken a sip. His hand was going to approach the glass,” Kazemi wrote at 5:01am.

“This country needs bravery,” he said.