A former Army captain has accused the Ministry of Defence of trying to block publication of a book on the lessons to be learned from Britain's military campaign in Helmand Province, despite commissioning him to write it in the first place.

Dr Mike Martin said he was commissioned by the MoD to research the UK's conflict in the province.

But when he turned the study into a book, officials stepped in to block its publication, claiming it breached the Official Secrets Act, he said.

The 31-year-old, who served a total of 10 years in the Army and Territorial Army, has now resigned his commission as a TA captain and plans to forge ahead with the book's release.

An Intimate War - An Oral History of the Helmand Conflict 1978-2012, which includes criticisms of a failure by commanders to understand the nature of the conflict, will now be published later this month.

Oxford-educated Dr Martin, who said he also advised senior British officers in Helmand, wrote his MoD-funded doctorate in 2011 and 2012 and was awarded his PhD in February 2013.

He said he told MoD officials of his plans to convert it into a book with proceeds going to charities Combat Stress and the Afghan Appeal Fund.

He said: "The PhD has already been published, it's been in King's College library for a year or something.

"Even before I was awarded it I sent it to various people in the Army and the MoD. At the time I told them that I was going to be converting this into a book - there's no difference in the content, just the style.

"I heard nothing until about February this year when they said 'you can't run it'."

He claimed one of the arguments given was that the inclusion of Wikileaks material and "other classified material" would be a breach of the Official Secrets Act, and said he had sought clarification from the MoD but again heard nothing until he was told on Friday that he was banned from publishing the book as he was a serving officer.

"So I resigned my commission on Monday and we have restarted the print run."

Dr Martin, from east London, said: "I do believe the Army needs to really look at how it does its business because there's been such an intelligence failure in Afghanistan.

"But I also believe you can't reform systems unless you are inside them, which I was."

He said the book was " not critical of the MoD per se, it's critical of our ability to understand that type of conflict", and accused officials of trying to "protect the reputation" of Britain's US allies, who he claimed made mistakes that served to destabilise the region before UK forces even arrived.

But the MoD today said that claims of a "last-minute attempt" to block the book using the Official Secrets Act as grounds were "simply not the case".

In a blog posting, it said it had funded Dr Martin's PhD because it was interested in a "critical analysis of its role and in learning lessons for the future", but had not commissioned him to write a book.

It said when officials became aware that he intended to publish the work as a book, it had entered into a dialogue with him about the clearance process needed to publish a book.

The blog said the Army accepted that classified documents referred to in the book were sourced from the public domain so the final decision not to approve publication was not based on Official Secrets Act considerations.

It went on: " Dr Martin has elected to resign his Reserve Commission and will publish the book as planned. The MoD has no objection to this and is not in any way attempting to prevent the book's publication.

"The Army simply decided that it was inappropriate for a serving officer to publish a book that is so heavily critical of the Army, the MoD and our allies. It respects the decision Dr Martin has taken.

"The existing policy on publication of books and articles by serving military personnel is clear and exists to ensure that our operational security and the personal security of our people is protected. It is also designed to protect the hard won reputation of the Armed Forces."

In a statement, an MoD spokesman said: "The MoD has a strong record of learning from previous campaigns and encourages its officers to challenge existing norms and conventional wisdom.

"However the publication of books and articles by serving military personnel is governed by well established policy and regulations. When these are breached the MoD will withhold approval."