3M (MMM 0.46%) has gotten hammered over the past few years. Its share price has tumbled nearly 50% over the last three years. That massive decline has driven the industrial giant's dividend yield up to around 6%.

Legal issues have been a big factor weighing on the stock. However, 3M has recently agreed to a couple of multibillion-dollar settlements that could put its legal woes in the rearview mirror. Here's a look at whether they'll put its dividend at risk or are a catalyst to buy the stock.

Starting from a position of strength

3M has a stellar track record of paying dividends; the company has paid dividends without stopping for more than a century. Meanwhile, it has increased its payout for the last 64 consecutive years, putting it in the elite group of Dividend Kings

Despite the recent headwinds, it has generated more than enough cash to cover its dividend. While 3M's adjusted free cash flow fell 25% last year to $4.7 billion, that was still more than enough to cover its dividend outlay of $3.4 billion. Meanwhile, its adjusted free cash flow surged 35% through the first half of this year to $2.4 billion, easily covering its $1.7 billion dividend outlay.

The company's ability to generate excess cash allowed it to strengthen an already strong balance sheet. 3M's net debt has declined by 12% over the past year to $11.7 billion. That supports its A bond rating. The company's strong cash flows and balance sheet put it in a solid position. 

The legal picture is getting a lot clearer

Despite the company's financial strength, there has been a lot of uncertainty about whether it could handle its legal liabilities while continuing to pay dividends at the current level. However, 3M's future legal liabilities have become clearer this year. In late June, the company resolved its claims with public water suppliers over chemicals found in groundwater. It committed to pay up to $10.3 billion over 13 years to remediate the problem. Meanwhile, the company has agreed to settle claims that it sold the U.S. military defective earplugs. It agreed to pay $6 billion ($5 billion in cash and $1 billion in stock) from 2023 through 2029.

While substantial, these claims were toward the low end of analysts' expectations. Because of that, there's growing optimism that the company can handle these liabilities. According to one analyst, 3M will have more than $18 billion in available liquidity to address its legal liabilities, including cash on hand, free cash flow, the special dividend from its healthcare spin-off, and the remaining value of its stake in that company that it plans to eventually monetize. It also intends to seek some insurance recovery to help offset its earplug settlement payments. That gives it ample financial resources to cover its legal liabilities, especially since it will pay them over many years. 

A cheap price

The company's legal settlements also provide a bit more clarity on its future earnings. 3M currently anticipates that its adjusted earnings will come in between $8.60 and $9.10 per share in 2023. That's a slight improvement from its initial view that it would report $8.50 to $9.10 per share of adjusted earnings this year. Meanwhile, analysts anticipate 3M's earnings will improve to about $9.80 per share in 2024.

The company trades at a cheap multiple of those earnings. With the sell-off in the stock price pushing it down to around $105 per share, 3M trades at a forward P/E ratio of about 10 times. For comparison, the S&P 500 index currently trades at about 20 times forward earnings. Meanwhile, 3M's historical P/E ratio has been closer to 20 times over the past decade. That low valuation multiple is a big reason 3M has such a high dividend yield. 

A tempting opportunity

3M has made significant progress in addressing its legal challenges this year, giving investors more clarity on its future liabilities. It seems like the company will have plenty of liquidity to cover those claims without cutting the dividend or putting too much pressure on its balance sheet. Because of that, it looks like the big-time dividend is safe. Meanwhile, the stock is trading at a dirt cheap valuation. Those features make 3M stock look like an attractive buying opportunity for investors seeking a high-yielding payout with additional upside potential as the weight of uncertainty starts to fall from its valuation.