Massachusetts on Tuesday imposed a four-month ban on sales of all vaping products, amid what officials called a national public health emergency that so far has been linked to nine deaths.

The state will block all sales of e-cigarettes and supplies, both those used for tobacco and marijuana, which is legal in the state, Governor Charlie Baker and state officials told a news conference.

The move goes further than New York state and Michigan, which earlier this month banned the sale of flavored vaping products, out of concern that those products appeal to children.

The ban, which applies to flavored and non-flavored products, took immediate effect and will last through Jan. 25, officials said.

"The use of e-cigarettes and marijuana vaping products is exploding and we are seeing reports of serious lung illnesses, particularly in our young people," Baker told a news conference.

The four-month period is intended to give medical experts time to determine what aspect of vaping is causing the illnesses and for the state to determine whether new regulations could allow for safer vaping products, Baker said.

A mysterious lung disease linked to vaping has sickened at least 530 people in 38 states, and its toll is expected to rise, federal health officials told a congressional hearing on vaping on Tuesday.

The popularity of e-cigarettes has now grown to the point where one in four 12th-graders reported vaping a nicotine product during the previous 30 days. It is nearly one in 10 for 8th-graders, a study by the University of Michigan in Ann Arbor reported.

Follow NBC HEALTH on Twitter & Facebook.