WASHINGTON (Reuters) – U.S. retail sales increased marginally in April as rising gasoline prices cut into discretionary spending, but consumer spending appeared on track to accelerate after slowing sharply in the first quarter.

The economic outlook got a boost from other data on Tuesday showing factory activity regaining momentum in May on strong orders growth. While manufacturers reported paying more for raw materials, they were absorbing much of the higher costs, a sign inflation will probably continue to increase at a moderate pace.

“A better pace of real consumer spending growth is taking hold in the second quarter,” said Scott Anderson, chief economist at Bank of the West in San Francisco. “However, rising fuel costs may be sapping gains in other spending categories.”

The Commerce Department said retail sales rose 0.3 percent last month after surging 0.8 percent in March. April’s increase was in line with economists’ expectations. Retail sales in April advanced 4.7 percent from a year ago.

Excluding automobiles, gasoline, building materials and food services, retail sales rose 0.4 percent last month after increasing 0.5 percent in March. These so-called core retail sales correspond most closely with the consumer spending component of gross domestic product.

Economists estimated that consumer spending, which accounts for more than two-thirds of U.S. economic activity, was growing at a 2.5 percent annualized rate early in the second quarter. Consumer spending grew at a 1.1 percent pace in the January-March quarter, which was the slowest in nearly five years.

The economy expanded at a 2.3 percent rate in the first quarter. Growth is expected to accelerate to a 3.0 percent pace in the April-June period.

In a separate report, the New York Federal Reserve said its Empire State current business conditions index rebounded four points to a reading of 20.1 in May. The rise recouped the bulk of March’s decline in the index. The survey’s prices paid index raced to its highest level since 2011. But a measure of prices received by manufacturers rose marginally.

Stronger consumer spending together with steadily rising inflation support economists’ expectations that the Fed will raise interest rates next month. The U.S. central bank lifted borrowing costs in March and has forecast at least two more rate hikes for this year.

The U.S. dollar rallied to a five-month high against a basket of currencies after the data. Prices for U.S. Treasuries fell, with the yield on the benchmark 10-year note rising to a seven-year high. Stocks on Wall Street were weaker.

GASOLINE PRICES A BURDEN

Economists blamed the slowdown in consumer spending in the first quarter on delays in processing tax refunds. They also said clean-up efforts in the wake of back-to-back hurricanes in late 2017 had pulled forward spending into the fourth quarter.

Consumer spending is being supported by rising wages, which are being driven by a robust labor market. While lower income taxes could also provide a boost, rising gasoline prices could blunt some of the stimulus. Prices at the pump have increased about 31 cents to near $3.00 per gallon since January, according to data from the U.S. Energy Information Administration.

“Looking ahead, the consumer now faces the added burden of higher gasoline prices,” said Michael Feroli, an economist at JPMorgan in New York.

With crude oil prices rising after President Donald Trump’s decision last week to pull the United States out of an international nuclear deal with Iran and vow to put tough sanctions on Tehran, gasoline prices are likely to remain elevated.

In April, auto sales edged up 0.1 percent after accelerating 2.1 percent in March. Receipts at service stations jumped 0.8 percent, reflecting higher gasoline prices, following a 0.3 percent gain in March.

Sales at restaurants and bars fell 0.3 percent, the largest drop since February 2017. Americans also cut back on spending on hobbies. Receipts at sporting goods and hobby stores dipped 0.1 percent last month, matching March’s drop.

Consumers also scaled back spending on personal grooming, with sales at health and personal care stores falling 0.4 percent last month. But households increased spending at furniture, building material and clothing stores last month.

They also boosted online purchases, but sales at electronics and appliance stores fell.