(Reuters) - Harley-Davidson Inc reported worse-than-expected quarterly profit on Tuesday and forecast a slump in global shipments of its motorcycles in 2019, sending its shares down 5 percent.

Still, to avoid the fallout of a tariff war waged by U.S. President Donald Trump, the American company said it would boost investment at its Thailand plant to serve European markets. Such a move would allow its motorbikes to avoid retaliatory tariffs by the European Union on U.S. imports.

The news on the Thailand facility was made public hours after Harley-Davidson reported a fourth straight year of declines in worldwide sales. The company has been struggling to revive demand in the United States, which accounts for nearly 60 percent of total sales.

The company expects to ship up to 222,000 motorcycles globally in 2019, the lowest number since 2010.

Shares closed $1.85 lower at $34.76. The stock of the Milwaukee, Wisconsin-based company has fallen about 30 percent since the beginning of 2018.

The motorbike maker said tariffs alone, including import duties imposed by the European Union on its motorcycles, would amount to between $100 million and $120 million in 2019 and contribute to a 6-percentage-point drop in operating margins in the first quarter of this year.

Operating margins in the fourth quarter declined 6.2 percentage points, in part due to the tariffs. Operating margins measure how much profit a company makes on a dollar of sales.

The company will invest $15 million to expand the Thai facility in the city of Rayong, and shipments to Europe will begin by the end of 2019. The plant was originally intended to serve Southeast Asian and Chinese markets.

The decision to shift production out of the United States for European markets was announced last summer after the EU slapped tariffs on U.S. imports in response to Trump’s duties on steel and aluminum imports from the trading bloc.

Trump had blasted Harley’s decision and publicly backed a boycott of the company.

His comments have compounded financial troubles in the United States for the company, as its core customers grow older and outreach efforts to lure younger riders have yet to show results.

A survey published last week by market research firm YouGov found that Trump’s attack led to an erosion in Harley’s brand impression among its core customers.

Harley-Davidson reported an adjusted profit of 17 cents per share in the fourth quarter, lower than the 28 cents estimated by analysts polled by Refinitiv.

Global retail sales fell 6.1 percent year-on-year. In the United States, sales dropped 10.1 percent in the quarter, more than the 8.3 percent decline expected by analysts.