Edington Cottage Hospital in North Berwick will stop taking new patients from Monday.
Current patients in the six-bed facility will be relocated to the East Lothian Community Hospital in Haddington over coming weeks, along with staff.
NHS Lothian has said the closure will be temporary and has been made necessary by the extreme pressure the health board is under, as a result of high demand and staffing shortages.
But supporters of the hospital say the decision was taken without due process.
Friends of the Edington Hospital said they were “shocked” by the decision, and have asked an Edinburgh lawyer to look into potential legal action.
Murray Donaldson, chair of the group, said: ”The way this has been handled without due process in terms of public consultation has been scandalous. We are very disappointed with this decision.
“There has been a cloud hanging over the hospital for some time and we know that whilst staff will be transferred to Roodlands, it does not take into consideration that North Berwick has become an increasingly attractive place for retirement and, with a growing elderly population, it puts even more pressure on that hospital in the years ahead.
"Over 5,000 people have signed our petition and that tells you the depth of feeling and outrage at this decision.”
Alison MacDonald, chief officer of East Lothian Health and Social Care Partnership, said: “The relocation of the inpatient beds at Eddington Cottage Hospital to East Lothian Community Hospital is temporary and will be reviewed every three months.
“The decision was taken via the Gold Command structure, which enables swift and necessary multi-agency decision making during times of particular duress.
“We are approaching what could be one of the most challenging winters on record for the NHS, coupled with increasing staffing pressures caused by the Covid-19 pandemic.
“That is why we are acting, in advance and in a planned way, to consolidate staffing to ensure that we can maintain patient safety and continue to deliver quality care, while also protecting the wellbeing of our hard-working staff.”