Harley-Davidson Inc. surged past expectations for first-quarter profit on Tuesday and drew a change of tack from US President Donald Trump, who vowed to protect the motorcycle maker from European tariffs, driving its shares up 3 percent.

Trump had previously criticized Harley for its plans to shift some US production overseas to avoid European Union duties imposed in retaliation for the tariffs the White House placed on imported steel and aluminum last year.

But ahead of a speech Saturday in Wisconsin, where Harley is based, the president said on Twitter that the bloc’s treatment of the company had been “unfair” and vowed to reciprocate.

“The shares have rallied (we think) in anticipation of potential tariff relief … we remain cautious in our outlook for the U.S. motorcycle industry, and continue to rate the shares Hold,” Stifel analyst Drew Crum said.

The costs of Trump’s trade wars have only added to the troubles of the world’s most iconic motorcycle brand, which has struggled to attract younger fans as its core customers won in the rebel heyday of the 1960s and ’70s grow older.

Earlier this year, Harley said the retaliatory import duties imposed by the European Union on its bikes would cost the company between $100 million and $120 million in 2019.

EU tariffs on US-manufactured motorcycles, which increased to 31 percent from 6 percent last June, are set to rise to 56 percent in 2021.

Similarly, China’s tariffs on the bikes exported from the US have increased to 55 percent from 30 percent as a result of the trade war between the world’s two biggest economies.

The company topped expectations for first-quarter profit by more than 30 cents per share and stuck to shipment forecasts for the whole of 2019, which some analysts had expected to be cut.

Overall sales, however, continued to fall. US retail motorcycle sales, or sales by dealers to customers, fell 4.2 percent in the first quarter ended March 31. European sales were down 2.1 percent.

The company’s overall net income fell 26.7 percent to $127.9 million in the quarter, while revenue from motorcycles and related products fell 12.3 percent to $1.19 billion, roughly in line with forecasts.

That generated earnings per share, excluding items, of 98 cents, compared with the average analyst estimate of 65 cents per share, according to IBES data from Refinitiv.