Chief medical officer for England Sir Liam Donaldson is to step down in May after 12 years in the post.

His achievements include the smoking ban, the creation of the Health Protection Agency and the introduction of clinical governance.

Sir Liam has led the response to the swine flu pandemic and has said that, if it unexpectedly worsens, he will stay in post beyond May.

Department of Health director general of research and development and chief scientific adviser Dame Sally Davies has been mooted as a likely successor.

In his resignation letter to cabinet secretary Sir Gus O’Donnell, Sir Liam said: “I have been immensely privileged to serve in this post over the past nearly 12 years.

“I have been pleased to see many of my policy recommendations - stem cell research, smoke-free public places, reforms to the General Medical Council, changes to consent for organ and tissue retention and the creation of the Health Protection Agency - carried forward into legislation.

“I have been pleased too, that reforms I proposed to improve quality and safety of NHS care - clinical governance, a patient safety programme, procedures to identify, and prevent harm from, poor clinical practice - are fully embedded in the service and have been also adopted in many other parts of the world.”

Prime minister Gordon Brown said in a statement: “I want to thank Sir Liam Donaldson for his outstanding work as chief medical officer for England since 1998. “He has made an extraordinary contribution to the nation’s health, from championing the ban on smoking in public places, to tackling the shortage of donated organs and most recently leading our response to the swine flu pandemic.

“His leadership and action in these areas and others will have saved many, many lives. I and the whole country are extremely grateful for all he has done and wish him all the best for the future.”