Two suicide blasts in Kabul killed 25 people including Marai along with at least eight other journalists, in what Reporters Without Borders said was the most lethal single attack on the media since the fall of the Taliban.
The attack, claimed by the Islamic State group, also known by its Arabic acronym Da’ish, was condemned internationally by groups including the United Nations and the European Union, and spurred an outpouring of grief among Afghan journalists, many of whom took to Twitter to post tributes to colleagues and friends.
Kabul police spokesman Hashmat Stanikzai said the second explosion came minutes after the first and targeted reporters at the scene.
"The bomber disguised himself as a journalist and detonated himself among the crowd," he said.
At least 25, including journalists killed as twin suicide blasts rock Kabul
The interior ministry confirmed the number of deaths and said 49 people had been wounded amid fears the toll could rise.
Later Monday the BBC confirmed that one of its reporters, 29-year-old Ahmad Shah, was killed in a separate attack in eastern Khost province, near the border with Pakistan. The broadcaster did not immediately give further details.
In a third attack 11 children were killed and 16 people wounded, including foreign and Afghan security force members, when a suicide attacker exploded his bomb-laden car near a convoy in the southern province of Kandahar, officials said.
There was no immediate claim of responsibility for that attack, which brought the total number of people killed across the country to 37.
Journalists from Radio Free Europe and Afghan broadcasters Tolo News and 1TV, as well as others, were among those killed in Kabul, Reporters Without Borders said.
"This tragedy reminds us of the danger that our teams continually face on the ground and the essential role journalists play for democracy," said Fabrice Fries, CEO of AFP.
Marai -- who was buried later Monday -- joined AFP as a driver in 1996, the year the Taliban seized power, and began taking pictures on the side, covering stories including the US invasion in 2001.
In 2002 he became a full-time photo stringer, rising through the ranks to become chief photographer in the bureau.
His versatility and easy camaraderie was demonstrated in a message moments before the second attack, in which he reassured an AFP video colleague who was stuck in traffic and could not reach the scene.
"No worry man, I am here," he said by WhatsApp, adding that he was shooting video in addition to taking photos.
He leaves behind six children, including a newborn daughter.
"This is a devastating blow for the brave staff of our close-knit Kabul bureau and the entire agency," said AFP Global News Director Michele Leridon, describing him as a "treasured colleague".
"We can only honour the extraordinary strength, courage, and generosity of a photographer who covered often traumatic, horrific events with sensitivity and consummate professionalism," Leridon said.
"We also send our condolences to the families of other journalists killed in this terrible attack."
IS, which has dramatically stepped up its attacks in Kabul in recent months, claimed responsibility via its propaganda agency Amaq.
The attacks come days after the Taliban began their spring offensive in an apparent rejection of calls for the militants to take up the Afghan government's offer of peace talks.
Reporters Without Borders said that since 2016 it has recorded the killings of 34 journalists in Afghanistan, which it ranks at 118 out of 180 countries on the Press Freedom Index.
Prior to Monday's blasts, the deadliest attack on the media in recent years was in 2016, when seven employees of popular TV channel Tolo were killed in a Taliban suicide bombing.
At least 11 children killed as third blast rocks Afghanistan
In November last year broadcaster Shamshad TV was stormed by gunmen who killed one person. The defiant station was back on the air within hours, a newscaster with bandaged hands reporting on the attack as its director vowed: "They cannot silence us".
"I've seen them work and trust me, the colleagues of the dead will be back to cover the next horrendous attack #pressfreedom", tweeted journalist Sune Engel Rasmussen Monday, who formerly reported for the Guardian newspaper in Kabul, in response to Monday's blasts.
They follow several bloody attacks across the country, including a bombing that targeted a voter registration centre in Kabul and killed 60 people last week.
President Ashraf Ghani's government is under pressure on multiple fronts this year as it prepares to hold long-delayed legislative elections in October.
Some Western and Afghan officials expect 2018 to be a particularly bloody year, with the Taliban and other militant groups controlling or contesting large swathes of the country.
"I taught myself photography," Marai said in a company profile in 2015. "Now my photos appear around the world.
"My best memories are when I beat the competition by getting the best photographs of the president or someone else, or from the scene of a bomb attack. I like to be first."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ