U.S. stocks headed broadly higher in midday trading on Wall Street Tuesday as investors digested optimistic comments on trade from Mexico, along with a technology sector recovery and an encouraging signal on interest rates from Federal Reserve Chairman Jerome Powell.

Mexican Foreign Minister Marcelo Ebrard said Mexico can likely make a deal with the U.S. when officials meet on Wednesday and stave off U.S. plans to place 5% tariffs on Mexican goods. President Donald Trump plans on imposing the tariffs beginning June 10 as part of a broader immigration dispute.

The threat of a trade battle with Mexico comes with investors already worried about an escalating trade war between the U.S. and China. The stock market suffered its first monthly loss of the year in May as investors fled to safer holdings such as bonds.

Meanwhile, Powell said the Fed was "closely monitoring" the trade developments and would "act as appropriate" to sustain the U.S. economic expansion, a signal the Fed would be prepared to cut rates if needed. Some investors are even beginning to bet that the Fed's next move will be a rate cut later this year.

Technology stocks recovered and helped drive the broader market higher. On Monday, technology companies slumped over concerns that several big internet companies could face more scrutiny from antitrust regulators.

Chipmakers were all broadly higher. Micron rose 5.2% and Texas Instruments rose 3%. Other technology companies rallied. Microsoft rose 2.2% and Apple rose 3.6%.

Facebook lagged the market and swayed between small gains and losses. A top European Union legal adviser said that social media networks could be ordered to take down anywhere in the world any text, photo or other media ruled to be defamatory by a court.

Banks also posted gains as lower bond prices pushed yields on the 10-year Treasury higher. Banks benefit from higher yields because they can charge more interest on loans. Bank of America rose 4.1% and Citigroup rose 4.8%.

Utilities lagged the market in another sign that investors were shifting funds away from safe-play holdings and into riskier, but potentially more profitable investments.

KEEPING SCORE: The S&P 500 index rose 1.5% as of 11:30 a.m. Eastern time. The Dow Jones Industrial Average rose 426 points, or 1.7%, to 225,245. The technology-heavy Nasdaq composite rose 1.9%.

OVERSEAS: European stocks rose broadly following a report that the unemployment rate fell to its lowest level in more than a decade in the 19 countries that use the euro. Germany's DAX jumped 1.5% and the CAC 40 in France rose 0.5%.

FED FEEDS HOPES: Chairman Jerome Powell said the Federal Reserve is prepared to respond to the Trump administration's trade conflicts to protect the U.S. economic expansion if it decides that would be necessary. The current expansion next month will become the longest period of uninterrupted growth in U.S. history, surpassing the 10-year expansion of the 1990s.

"We do not know how or when these issues will be resolved," Powell said in his remarks. "We are closely monitoring the implications of these developments for the U.S. economic outlook and, as always, we will act as appropriate to sustain the expansion."

The market's robust early gains this year were partly fueled by the Fed's move to take a more patient approach to its rates policy after steadily raising rates for two years. Investors have been hoping it will go further and cut interest rates to give economic growth another push.

BOXED IN: Online storage provider Box fell 7.9% after giving investors a weak revenue forecast for the year. The company cited a shift to longer sales cycles. The company also said it is "no longer prudent" to give a timeframe for reaching a $1 billion revenue milestone.

LINGERING LUSTER: Luxury jeweler Tiffany rose 5.4% after beating Wall Street's profit forecasts for the first quarter. Investors focused on the solid profit figures amid a very mixed report.

A key figure measuring sales at established stores fell short of forecasts and Tiffany warned that higher costs from tariffs could cut into its profit.

TRANSFORMING DRUGSTORES: CVS Health rose 4.1% after it announced plans to add more health services, including medical equipment and dietitians to more than 1,500 stores over the next few years. The transformation will even include space for the occasional yoga class.

The transformation is part of a broader move within drugstores to expand services as they compete more intensely for customers' health care needs. Rival Walgreens is already experimenting with adding primary care offices to its stores. Its stock rose 3.2%.