Frank Dobson, the Labour former health secretary, has died at the age of 79 after being ill for several months, with Tony Blair and Gordon Brown leading tributes to their former colleague.

The politician, who represented Holborn and St Pancras, retired from politics four years ago, 36 years after he first entered parliament.

He was health secretary for the first two years of Blair’s government in 1997, after holding five shadow cabinet posts in opposition.

Blair described him as an “exemplary public servant and politician of the highest calibre” who made “many important improvements to the NHS” during his two years in the cabinet.

“He was a great colleague with an often pugnacious style, but always loyal to the Labour party and to changing the lives of people for the better,” Blair said.

Jeremy Corbyn paid tribute to Dobson’s political achievements. The Labour leader referred to him as “brilliant” when in charge of health and praised his “great wit”.

Speaking from the campaign trail, Corbyn said: “He was also a great raconteur, a great purveyor of stories, a great source of gossip around the House of Commons and a great wit in many ways, and would always remember the good and the bad in just about everybody he met.

“As a parliamentary neighbour of mine we got on absolutely famously.”

His family said: “The Dobson family is sad to announce the death of Frank Dobson, former MP for Holborn and St Pancras and secretary of state for health. His family would like to thank all the staff at the Homerton University hospital for their outstanding expertise, commitment and care in the last few months and also the staff of York hospital for his previous excellent care.

“He also greatly appreciated the support of his many friends and former parliamentary colleagues.”

Dobson is best known for his work as health secretary under Blair, but he was also leader of Camden council before entering parliament. He resigned from the cabinet to run unsuccessfully in the inaugural race for the London mayoralty in 2000, which he later said he regretted. After his defeat to Ken Livingstone, he did not return to the Labour frontbench but served as an MP for a further 15 years.

MPs and friends paid tribute to Dobson, recalling his humour and decency.

Sir Keir Starmer, Labour candidate for Dobson’s former constituency of Holborn and St Pancras, said: “He dedicated his life to serve the people of Camden and a Labour party he loved. He will be remembered for his straight talking, good humour and the passion he brought to every job he had, including health secretary.

Joe McCrea, his former adviser and family friend, tweeted: “Heartbroken, but deeply, deeply proud and grateful to have had the honour of working for him and counting him and his family as lifelong friends. If there was a more decent human being and truer socialist, I have never met them and I doubt I ever will.”

Tulip Siddiq, the Labour candidate in neighbouring Hampstead and Kilburn, said: “Really gutted to learn that Frank Dobson has died. He has been part of my political life since I was 16. I will miss him enormously.”

Brown said: “Frank Dobson represented all that was good about Labour values. A passionate supporter of the National Health Service, he helped elect a Labour government in 1997 and went on to become a highly successful and reforming health secretary.

“He was always popular with colleagues, never forgetting where he came from or the people he came into politics to represent. My thoughts are with his family.”