I remember in July 2008 when the news broke of the decision to appoint Keir Starmer as director of public prosecutions (DPP). I was at a meeting of socialist lawyers, people who had spent their lives campaigning for the rights of homeless people and asylum seekers. We couldn’t understand why he’d taken the role.

On standing for the Labour leadership, Keir Starmer published a video, setting out his record as a barrister who had represented poll tax protesters and striking miners. “I don’t think anyone,” a voiceover says, “really expected someone who dedicated his career to defending workers, trade unions and trade unions to become director of public prosecutions.” They were right about that.

As a barrister, Starmer was a principled opponent of state power. He was one of us. But the DPP’s role is all about exercising power: prosecuting defendants so that they are fined or jailed. Starmer’s time as DPP has played a role in the Labour leadership contest, particularly in blogs and on social media – and will be studied even more closely if he wins. What should we make of it?

As DPP, Starmer was the head of the Crown Prosecution Service. This is the body that decides whether or not to prosecute someone accused of a crime. Where the decision is taken to prosecute, it is the CPS that employs a lawyer to argue in court for a conviction. The CPS is a huge organisation, undertaking more than half a million prosecutions a year, and employing almost 6,000 people.

When Starmer called for the prosecution of demonstrators with scarves around their faces, he was playing up to press fantasies about their motives

There were a number of decisions that Starmer got right. He was appointed by Labour but spent half his time in office under the Conservative-Liberal Democrat coalition. There, he defended the Human Rights Act against Conservative proposals to repeal it. Rightwing MPs briefed against him. Starmer deserves recognition for taking that stand.

There is a second group of decisions taken by the CPS for which Starmer has been criticised, but it is difficult to say whether the criticisms are justified. The “most difficult” decision was, according to Starmer, in relation to the killing of Ian Tomlinson, the newspaper vendor who was struck by police officer Simon Harwood during protests in 2009.

Although between 30 and 50 people die each year in police custody or following contact with the police, these deaths almost never lead to prosecution. In that context, the left demanded Harwood’s prosecution.

Starmer told the press that the CPS wouldn’t prosecute. He cited the report of Dr Freddy Patel, the pathologist appointed by the state, who found the death had been caused by natural causes. Although other pathologists disagreed with Patel, the CPS insisted that the fact of his opinion was an insuperable barrier to prosecution. In October 2010, Dr Patel was suspended from practice as a result of allegations concerning the way he undertook autopsies. The CPS again announced that Harwood would not be prosecuted. Only in May 2011, after an inquest jury had found that Tomlinson had been unlawfully killed, did the CPS agree to charge Harwood with manslaughter.

The difficulty in criticising Starmer for his handling of this case – or others like it – is that we don’t know what advice he was given. If senior prosecutors were advising him against proceeding, he can’t be faulted for caution. After all, what would be the point of prosecution, if it was highly likely that the officer was going to be acquitted? Which, in 2012, Harwood was.

Facebook Twitter Pinterest Keir Starmer in 2013, when he was director of public prosecutions. Photograph: Felix Clay/The Guardian

Where Starmer’s record may be more vulnerable to criticism is in his handling of the press. One of the DPP’s tasks is to issue guidance to prosecutors. The guidance reminds prosecutors of the powers already available to them. Usually, the guidance is not controversial. For example, in November last year, the CPS offered guidance on prosecuting offences under the Theft Act. As far as I can tell, no paper reported on that guidance; its publication was seen as the routine act of a government department.

Starmer has been accused of “[drawing] up rules that gave police officers more power”. It has also been suggested that as DPP he extended the jail term for benefits crimes. But the CPS does not draw up sentencing guidelines. The DPP’s guidance only binds prosecutors: it determines what they ask, not what the court gives them. As for protests, senior police officers, not the DPP, decide how they are policed.

His critics are able to exaggerate his role because of interviews given by Starmer himself in which he presented modest changes to the advice given to prosecutors as matters of real significance and used a tabloid-friendly language to defend them. This was how he justified the guidance on protests: “There’s a potential for a number of protests over the coming years that may be quite large … If someone has brought along a weapon or means of concealing their identity that’s likely to be evidence that they were anticipating trouble or disorder.”

In fact, over the past two decades, it has become more common for demonstrators to cover their faces. They do so because of the increasing use of snatch squads, police filming of political protests and scandals such as detention without arrest. When Starmer called for the vigorous pursuit of protesters who have concealed their identity, he was playing up to press fantasies about their motives.

Keir Starmer has the ability and the character, but what does he stand for? | Andrew Rawnsley Read more

This, meanwhile, is how Starmer explained his guidance to prosecutors in benefits cases: “It is a myth that ‘getting one over on the system’ is a victimless crime: the truth is we all pay the price”; and “It is vital that we take a tough stance on this type of fraud and I am determined to see a clampdown on those who flout the system.”

The largest group of benefits prosecutions concern the minor infractions of people who fail to declare a piece of information. For example, when part-time workers on housing benefit fail to tell the authorities that their hours at work have increased. Starmer’s words (“getting one over on the system”) were wide enough so that it seemed he was referring to such groups of claimants. And, in doing so, he evoked tabloid myths about undeserving individuals deliberately and systematically milking the system. To speak of claimants in this way was to denigrate them.

Looking back on Starmer’s management of the media while DPP, the sense is of an individual with a radical past making peace with power. He was at ease there in a way that Jeremy Corbyn, among others, could never have been.

His supporters will say that Labour needs a leader capable of winning press support. To which his critics will counter that the rightwing press is already ungenerously studying Starmer’s career. It is a mistake to think that his close proximity to high-profile cases will be anything other than a recurring weak point in relation to the tabloids.

Starmer’s enthusiasm while DPP for using mundane news events to feed the press with rightwing talking points is a possible concern for Labour members. If such a leader was faced with news of an injustice in the future – the consequence of a change to immigration rules, say, or of a strike in public services – Starmer’s approach to the press as DPP might raise worries that he would not give a principled defence of the victims but would tell the press whatever it wanted to hear.

• David Renton is a political activist and barrister. His latest book is The New Authoritarians