A rally on two of the most widely followed U.S. stock market indexes Thursday wasn't enough to prevent the first quarterly decline since Barack Obama's presidency.

The blue-chip Dow Jones Industrial average dropped 2.5 percent in the three months through March 29, the last trading day of the quarter since markets are closed on Good Friday, among the most important days in the Christian calendar. The broader S&P 500 fell 1.2 percent.

The declines, which occurred despite record highs on both gauges in January, were the first under President Trump and reflected higher volatility as economic growth appeared likely to push interest rates up more quickly than expected and tariffs on metals and Chinese imports sparked worries of a trade war. Shakeups in Trump's cabinet and pressure on technology stocks after Facebook reported that user data had been improperly accessed by a company linked to the president's 2016 campaign also weighed on markets.

"Investors are rattled about the economic and inflation impacts of tariffs and a potential trade war," Greg McBride, chief financial analyst at Bankrate.com, said in an interview near month's end. "This bull market of the last nine years has been sustained by a growing economy and a low-inflation, low-interest-rate world, and now those conditions are called into question."

The president's plan for trade restrictions with China, outlined in a memo Trump signed March 22, involves duties of 25 percent on goods in sectors such as aerospace, information communication technology, and machinery. His trade chief, Robert Lighthizer, has another week to determine which items, specifically, should be included in the levies, which may ultimately be applied to as much as $60 billion in goods.

A comment period after Lighthizer's recommendations would extend for at least a month, giving Wall Street time to express concerns that have prompted rebukes from retailers and the Business Roundtable, an organization representing the 200 largest U.S. companies.

Fears that Trump's protectionist instincts would prompt him to ignite a trade war have been growing since his decision in early March to impose tariffs of 25 percent on steel imports and 10 percent on aluminum under national security provisions of federal law.

The China duties involve unfair trade practices, a different section of the law, but the White House has wide latitude under both. The president, who often bragged early in his tenure about the stock market's performance, has brushed off concerns about its reaction to the tariffs.

His cross-border transaction policies, along with Special Counsel Robert Mueller's investigation of whether Trump's campaign colluded with Russia and the rapid approach of mid-term elections remain catalysts for financial markets, said Chris Krueger, an analyst with Cowen Washington Research Group.

Republican control of both houses of Congress and the Oval Office was among the drivers of the stock market's rapid growth since November 2016, prompting bets of more business-friendly laws and policies. A Democratic majority in either the House or the Senate is viewed as raising the risk of tighter regulation.

With only a little more than half a year until the November vote, the market's performance -- and its reaction to goverment policy -- may become progressively more important to both the White House and Congress, predicted Tony Roth, who oversees $83.5 billion in assets as chief investment officer for Wilmington Trust.

Actions that lower market valuations, significantly pinching Americans' accumulated wealth, would "have a direct political consequence," he said: "More pains for Republicans in mid-term elections."

Before this quarter, the most recent three-month decline for the Dow Jones and S&P 500 indexes was posted on Sept. 30, 2015, when they dropped 7.6 percent and 7 percent, respectively.