Consumer sentiment rocketed to its highest level in 15 years in early May as Americans grew more upbeat on the health of the economy and its path in 2019, according to data released Friday.

The University of Michigan's preliminary print on its consumer sentiment index rose to 102.4, up from 97.2 in April and well ahead of economist expectations of 97.5.

"Consumers viewed prospects for the overall economy much more favorably, with the economic outlook for the near and longer term reaching their highest levels since 2004," said Richard Curtin, chief economist for the Surveys of Consumers. "To be sure, negative references to tariffs rose in the past week and are likely to rise further in late May and June."

The optimistic consumer outlook was mostly recorded before U.S.-China trade deliberations soured earlier this month.

Last week, the Trump administration raised tariffs to 25% from 10% on $200 billion worth of Chinese goods in response to Beijing's attempts to renegotiate a trade agreement between the world's two largest economies. China then responded in kind, bumping taxes on $60 billion worth of U.S. goods in retaliation.

Aggravated trade tensions between the U.S. and China could dampen consumer sentiment going forward, Curtin said, and will likely weigh on subsequent reports in May and June.

"Even apart from the direct impact of tariffs on prices, rising tariffs could cause a more general loss of confidence which could further diminish the pace of consumer spending," Curtin wrote. "At present, the data point toward moderate spending growth in the year ahead. Nonetheless, the data indicate the corrosive impact of an escalating trade war."