Lasantha Wickrematunga lies in state during his funeral ceremony in Colombo. Photograph: Lakruwan Wanniarachchi/AFP/Getty Images

Lasantha Wickrematunge thought and talked a lot about his own death. He had known for a decade that his career as Sri Lanka's most provocative independent journalist would ultimately prove fatal. He made precise preparations for the end.

In public, he appeared sanguine. When Sri Lanka's president, Mahinda Rajapaksa, called him in a fury last year, screaming that he would be killed if he continued to speak out, he laughed it off. When a funeral wreath was delivered to his door, colleagues at the Sunday Leader, the virulently anti-establishment paper he edited, said he got a "kick out of it". Earlier this month, when he received a page of his own newspaper daubed in red paint with the words "If you write you will be killed", he appeared to pay no attention.

Privately, however, he sat down in his office and composed a powerful, valedictory column, accusing the government of his still-to-be-committed murder. "When finally I am killed, it will be the government that kills me," he wrote in this obituary, which he left for publication after the expected assassination. He predicted that the president - who was, despite their differences, a longstanding friend - would be "anguished" by his death, but would have "no choice" but to protect his killers; addressing the president directly, he anticipated a police cover-up: "You will see to it that the guilty one is never convicted."

With crushing eloquence, he expressed bleak despair about the state of his homeland. "Murder has become the primary tool whereby the state seeks to control the organs of liberty," he wrote.

It is not clear quite when he completed the 2,500-word column, which he saved on his office computer in a file marked "Final Ed", but early on 8 January, Wickrematunge was stopped as he drove to work by a group of three or four armed men on motorcycles. They fired through his windscreen, and he was shot in the head. He died later that day in hospital. His mobile phone filled with the numbers of his numerous contacts has not been recovered.

The civil war in Sri Lanka has been so protracted, and the political situation remains so intractably complex that, in normal times, the routine human rights violations provoke only the most languid international response. But Wickrematunge's murder has dragged global attention back to the conflict. This week newspapers around the world carried reports on his death, and several, including the Guardian and the online edition of the New Yorker, published his last column in full.

In death, much more powerfully than in life, Wickrematunge has forced the world to take note of the state-sponsored crackdown on dissent, which has coincided with a recent intensification of the Sri Lankan military's offensive against the Tamil Tiger rebels in the north of the country.

Very little is known about the human cost of the massive drive to eliminate the Liberation Tigers of Tamil Eelam (LTTE). Significant military advances are announced almost daily by the state media, but since last autumn the government has prevented journalists from travelling independently to the conflict zone, and international humanitarian agencies have been forced to pull out.

The Sunday Leader highlighted this worrying absence of information and relentlessly questioned the government's use of force. This undermining stance was as unwelcome as the critical coverage of the war broadcast by Maharaja Television, a large private broadcasting network, which was destroyed by gunmen armed with grenades and mines two days before Wickrematunge was killed.

"I sensed he was seeking martyrdom. He wanted to die," a close friend, who regularly discussed the subject with him, says. Like many people close to the journalist, he asked not to be identified, afraid of reprisals.

"He knew he was walking with death. There was this inevitability. I think he felt that everything he stood for would be proved and demonstrated by his murder - the growing intolerance of the government, of society."

This heroic posthumous vindication offers little comfort to the friends and family he left behind. But despite their grief, they agree that this was a man quite prepared to die in pursuit of the profession he loved. Wickrematunge, they say, was a charmer, who tracked down stories with indefatigable enthusiasm, someone who routinely arranged his first meeting of the day at 5am or earlier - a time when he believed he would not be followed by the police. He was a man who returned to his desk the morning after his house was showered with 40 rounds of bullets, "bright as a button".

"He would say it is better to die one death from a bullet, than 1,000 deaths as a coward," explained his first wife Raine, who left him in 2002 and fled to Australia with their three children, too afraid for their safety to remain in Sri Lanka.

"Sometimes I thought he was irresponsible, as a father, but no one could match his fearlessness. It was as if he didn't care whether he lived or died as long as he could do his job properly," she says, dressed in funereal white robes, looking out on to the verandah of their old family home, to which she returned the day he was killed. In the garden outside, a growing crowd of visitors lined up, waiting to offer her their condolences.

Wickrematunge was under threat since 1994, when he and Raine co-founded the paper and he began to write his weekly column, charting political scandal and exposing government corruption. In 1995 the couple were pulled from their car in a quiet residential street and beaten with wooden batons pierced with nails. Raine is vague about the details - this kind of thing happened all the time.

"We were coming home that night. He had just exposed ... what was it he had exposed? Let me think ... some corrupt deal by one of the ministers. I don't remember what," she says. The violence was so regular it became routine, unremarkable. "There were so many threatening calls. 'We are going to kill you. We are going to kill your children ...'"

One evening someone stuck a rifle through the grill of the gate, and shot through the front window, she recalls, getting up to see if the bullet holes were still there in the wall. "There were so many people gunning for him, from the president down. In the end it was intolerable. We had to leave," she says. She wanted her husband to join her, but he felt his work was too important. "I understood that."

Too detached now from the Sri Lankan political scene, Raine is unwilling to speculate on why Wickrematunge was killed, but elsewhere in Colombo the talk is of little else.

At the mournfully empty offices of the Sunday Leader, Sonali Samarasinghe, Wickrematunge's second wife, who he married just two months ago, was back at her desk, the day after his murder. That morning as she looked through his computer she found his farewell column, ready for publication. She brushed off backbiting rumours, which briefly circulated the capital this week, suggesting that the article had been written by colleagues on the paper posthumously.

"It was there, saved electronically," she says. "I was shocked to find it; I didn't know he thought it would be so soon. Usually he was blase about the threats, but he had obviously had a premonition that they were coming for him."

So far (as her husband anticipated) the police have not caught those responsible. She suspects the murder was ordered by someone "on a rung lower than the president", but will say no more.

Attempting to explain the power of Wickrematunge's weekly column, Ranee Mohamed, features editor, gripped her hands around an imaginary baseball bat and swung it from right to left. "It was like this. He whacked everybody." She says people would caution each other mid-sentence: "Don't let's talk about this in public, it will end up in the Sunday Leader."

The columns were prone to sensation. One regular reader described the style as "muckraking" and heavy with gossip, hazarding that the accuracy rate was somewhere between 60% and 70%. The English-language paper has a circulation of about 70,000, and is not read by the vast majority of Sri Lanka's 21 million multi-ethnic population, but the English speakers are disproportionately powerful. For all its idiosyncrasies, Wickrematunge's work was feared as much as it was respected, and he had many enemies.

He had no political affiliations, attacking previous governments as relentlessly as the current one. One week he would argue for the legalisation of homosexuality, the next he might scrutinise the involvement of the president's brother Gotabhaya Rajapakse, the defence minister, in a deal to buy MiG fighter jets from Russia. He was fiercely critical of the LTTE, describing them as among "the most ruthless and bloodthirsty organisations to have infested the planet".

But it was his refusal to buy into the government's current triumphalist approach to the war that really enraged parts of the government, observers say. Determined to crush the Tamil Tigers, Rajapakse's administration has poured enormous resources into the military struggle in the north and east of the country, and in recent months, these investments have paid off. In the year since the government withdrew from the Norwegian-brokered ceasefire, much of the Tigers' territory has been seized back. For the first time in decades, the government is contemplating victory.

Wickrematunge refused on principle to send his journalists on state-orchestrated tours of the war zone, and his farewell column expressed his "horror that Sri Lanka is the only country in the world routinely to bomb its own citizens". He stressed that a military victory without a negotiated settlement with the Tamil people of the north and east would lead to a long-term "festering wound that will yield strife for all eternity".

Editors at Maharaja TV, took a similarly critical stance on the war. Shortly after a military mine was detonated in their studios, Wickrematunge hurried to the building to show solidarity. It was 4am and he was still in his slippers. Two days later he was assassinated.

Colombo does not immediately feel like the capital of a country riven by civil war. Women walk at a leisurely pace through the palm-lined streets; small groups of Birkenstock-shod backpackers congregate in courtyard cafes. But at the city's centre, which has been repeatedly targeted by suicide bombers, a thick log-jam of army checkpoints is in place, manned by soldiers with AK-47s.

Residents - particularly those in liberal circles - have begun to watch what they say, and throw twitching glances behind them before they speak. "There appears to be a systematic campaign to stamp out any kind of dissent," Dr Paikiasothy Saravanamuttu, director of the Centre for Policy Alternatives, an independent thinktank based in Colombo, says. "I think that Lasantha was killed by elements within the government."

The popular delight over the military victory was being used as a "smokescreen" to eliminate dissent, he argues. With state newspapers reporting daily military triumphs, public attention could swiftly be diverted from news of human rights abuses.

The brazen nature of the daylight assassination also leads friends and colleagues to point to the government.

"Everyone is asking how four motorbikes could get in that high-security zone and carry out that attack. You can't go out to buy two aspirins without being stopped at a checkpoint. This kind of attack couldn't be done by someone without influence," one journalist says, adding: "Please don't name me. They'll come for me next."

At the end of his obituary, Wickrematunge said: "I hope my assassination will be seen not as a defeat of freedom but an inspiration for those who survive." But among friends and colleagues there is a palpable sense of helplessness.

Despite words of condemnation from Gordon Brown and other leaders this week, no one anticipates that the surge in censorship, extra-judicial killings, disappearances and other human rights violations will trigger any real crackdown on Sri Lanka from the west.

"Sri Lanka is not a country that is of any importance to anyone. Its government knows that statement after statement of condemnation will be made by western governments, but nothing will be done," Dr Saravanamuttu says.

Wickrematunge's desk at the Sunday Leader is piled high with the documents he was reading through the night before his murder. The room is hot and stuffy, silent except for the heavy ticking of the clock which hangs above a framed award from Transparency International, the corruption monitoring group.

Outside the window, a long shed with a huge hole in the corrugated iron roof is visible - the scene of an arson attack last year on the paper's printing presses. A white mourning bunting hangs in the courtyard, and a huge, two-metre high painting of the dead editor's face is propped in stairwell.

Sonali Samarasinghe, the second wife, is determined to continue publishing, but it seems likely that the Sunday Leader has been dealt a mortal blow. "We can't work without him," Ranee Mohamed says; he was the source of most of the paper's scoops. Others are considering whether it is safe to remain in the office, and even in the country.

"People will be scared, but we will carry on." Samarasinghe says. "Just because our general has been removed does not mean that our army cannot operate."

She has been strong, but suddenly tears began to slip silently from her eyes. Embarrassed, she apologises and continues: "I don't want his life to be in vain."

•2001 Tiger attack on main international airport - many planes destroyed.

•2002 Ceasefire signed.

•2003 Tigers pull out of talks.

•2006 Tamil Tiger attacks increase. Peace talks in Geneva fail.

•2007 In January, government troops capture Tiger's eastern stronghold. Tens of thousands of civilians are displaced. In March, Tigers launch air raid on military base and three airmen are killed. In June, police force hundreds of Tamils out of Colombo.