FRANKFURT—The European Central Bank cut its key interest rate and launched a sweeping package of bond purchases Thursday that lays the groundwork for a long period of ultraloose monetary policy, jolting European financial markets and triggering an immediate response from President Trump.

The ECB’s pre-emptive move was aimed at insulating the eurozone’s wobbling economy from a global slowdown and trade tensions. It is the ECB’s largest dose of monetary stimulus in 3½ years and a bold finale for departing President Mario Draghi, who looks to be committing his successor to negative interest rates and an open-ended bond-buying program, possibly for years.

But the move triggered opposition from a handful of ECB officials, according to people familiar with the matter, while leaving key practical questions unanswered. Primarily: How long can the ECB keep purchasing bonds without significantly enlarging the pool of assets it can buy? Some analysts estimated it might be less than a year.

Investors initially cheered the surprise move as they anticipated the return to bond markets of an 800-pound gorilla, sending the euro down against the dollar and bidding up the prices of eurozone government debt. But those gains later reversed as Mr. Draghi highlighted divisions within the ECB’s rate-setting committee over its future course.

In a tweet, Mr. Trump wrote that the ECB was “trying, and succeeding, in depreciating the Euro against the VERY strong Dollar, hurting U.S. exports.” The Republican president has repeatedly criticized the Federal Reserve for being less aggressive than the ECB.