Cigarette and tobacco products maker Altria Group (MO) - Get Report on Thursday posted better-than-expected third-quarter earnings and announced that it has written down its multi-billion-dollar investment in e-cigarette maker Juul by a third amid ongoing controversy surrounding the health and safety of vaping products.

In its quarterly earnings report released on Thursday, Altria said it recorded a $4.5 billion pretax charge to cut its $12.8 billion stake in Juul made a year ago, citing the Trump administration's plans to remove flavored e-cigarettes from the market, as well as e-cigarette bans that cities, states and countries are putting into effect.

The announcement came as the Richmond, Va.-based company reported third-quarter earnings and sales that beat analysts' forecasts amid strong demand for its traditional tobacco products as well as smokeless products like IQOS, a similar type of heated tobacco device.

"Although a $4.5 billion writedown of Juul is negative in absolute terms, we believe investors had come to expect such an event given the negative political/regulatory challenges Juul now faces," Deutche Bank analyst Steve Powers and his team wrote in a research note following Altria's earnings announcement.

For the third quarter, Altria posted a net loss of $2.6 billion, or $1.39 a share, vs. earnings of $1.9 billion, or $1.03 a share, in the comparable year-earlier quarter. Folding in its Juul write-down, the company posted adjusted net earnings of $1.19 a share vs. an adjusted $1.08 a share a year ago.

Analysts polled by FactSet had been expecting earnings of $1.15 a share. Sales grew 0.3% to $6.9 billion, "primarily due to higher net revenues in the smokeless products segment," the company said.

"Our core tobacco businesses delivered excellent third-quarter financial results," CEO Howard Willard said. "Our 2019 plans remain on track, and we reaffirm our guidance to deliver full-year 2019 adjusted diluted EPS growth of 5% to 7%."

Altria invested $12.8 billion for a 35% stake in Juul late last year, valuing the e-cigarette start-up at $38 billion. Since then, Juul has been engulfed in a plume of controversy, being largely blamed for fueling the teen vaping epidemic.

To be sure, some analysts remain cautious about Altria in general, given the cigarette maker's still-hefty investment in Juul, its stake in cannabis producer Cronos (CRON) - Get Report , which has brought it into the world of marijuana products, and the fact that it generally relies on a market segment - smoking - that is not growing. 

"We have been cautious on Altria for a while, and even more so following the Juul and Cronos deals, believing that near-term earnings would come under more pressure," Jeffries analyst Owen Bennett wrote in a research note to clients. "Today's release supports our cautiousness with new guidance into FY22 (5%-8%) below historical targets (7%-9%) and the Juul impairment suggesting money was not wisely invested."

Shares of Altria ended the trading day Thursday down 2.55%, or $1.17 a share, at $44.79.

Save 57% during our Halloween Sale. Don't let this market haunt you and join Jim Cramer's Investment Club, Action Alerts PLUS. Click here to sign up!