Facing an explosion of vaping-related illnesses, Governor Charlie Baker said Tuesday he is ordering a four-month ban on the sale of all vaping products in Massachusetts, the latest — and perhaps furthest-reaching — move to address what the governor called a public health emergency.

Baker, in declaring the emergency, said the temporary ban will apply to sales of both tobacco and marijuana electronic cigarettes.