As the country mourns the suicide deaths of iconic public figures Kate Spade and Anthony Bourdain this week, a new study by the Center for Disease Control reveals that in both Massachusetts and the country, the number of suicide deaths has risen substantially over the last two decades.

The CDC found that between 1999 and 2016, suicide rates rose by 25.4 percent nationally. But in Massachusetts, that rate increased 35.3 percent.

In every state except Nevada, which saw a 1 percent decrease in suicide deaths, the number of people taking their own lives has risen.

States in the midwest saw the most dramatic spikes, and North Dakota had the highest increase in such deaths, with a 57.6 percent jump.

In exactly half of U.S. states, the suicide rate increased more than 30 percent.

The CDC says suicide is the country's 10th leading cause of death. Research found that firearms were the most common method of suicide by people both "with and without a known diagnosed mental illness."

Massachusetts legislators passed a "red flag" gun bill on Thursday, a law that state Senate President Harriette Chandler said would help reduce the risk of suicide in the state.

The CDC's new report came just days after news that designer Kate Spade took her life in her New York apartment. A day after the report was published, celebrity chef and writer Anthony Bourdain also died by an apparent suicide.

There is no single reason that motivates a person to take their life, the CDC reports, but common causes can include: mental illness, stigmas associated with mental illness and treatment, lack of relationship support, work or financial stress, a feeling of helplessness, barriers to healthcare and access to lethal means.

But intervention and treatment is possible for all vulnerable individuals: The CDC published a 62-page "Technical Package" that details multiple strategies to reduce the risk of suicide.

Those who need help can contact the National Suicide Prevention Lifeline for help at 1-800-273-TALK (8255). Those uncomfortable speaking on the phone can also opt to text the Crisis Text Line by texting the word NAMI to 741-741. Both services operate 24 hours a day, 7 days a week.