England's most senior GP has resigned after admitting he posted anonymous comments on an online medical forum.
Dr Arvind Madan, director of primary care at NHS England, is thought to have posted with the name "Devil'sAdvocate".
It comes after a group of more than 8,000 GPs called for Dr Madan's resignation, after comments he made about the closure of smaller practices.
In a statement, he said he had wanted to "provoke a more balanced discussion about contentious issues".
The magazine Pulse reported on Wednesday that Dr Madan stood by comments he made online suggesting GPs should be "pleased" with the closure of some small GP surgeries.
In the comment he said: "There are too many small practices struggling to do everything patients now want for their families in a modern era of general practice".
In the same magazine, the group GP Survival - which represents 8,000 GPs - had written an open letter calling for Dr Madan to resign as director of primary care.
The east London GP said it was clear he had "lost the confidence" of some of his colleagues over the comments.
Another post by Devil'sAdvocate said of GPs' pay: "We can get 6 figure salaries for working 4 days a week 45 weeks a year without on call... run that past the general public and see how much sympathy you get."
Announcing his resignation from NHS England, Dr Madan, who has been a GP for 23 years, said: "As part of my attempts to challenge the negative views - and even conspiracy theories - held by a small but vocal minority in the profession, I posted on an anonymous online forum used by GPs.
"It was never my intention to cause offence but rather to provoke a more balanced discussion about contentious issues acting as a devil's advocate.
"I wish to make it categorically clear that these comments are not a reflection of NHS England policy, and it is now clear to me that trying to move the debate on in this way is not compatible with my role as director of primary care."
He apologised to those who were upset - "particularly in smaller practices" - and added that "supporting general practice is too important an issue to allow it to be mired in unnecessary controversy".
Dr Madan said that small practices were struggling, which meant integrating them with others would prevent closures.
The British Medical Association (BMA) said Dr Madan had "done the right thing" in offering his resignation.
Its GP committee deputy chairman Dr Mark Sanford-Wood said: "We have today written to NHS England raising our concerns and demanding action after Dr Madan's damaging comments caused significant anger amongst the profession at a time when GPs require support from NHS England."