BERLIN >> German defense contractor Rheinmetall, Europe’s largest producer of munitions, said Wednesday that it was positioned to profit from the region’s willingness to increase military spending as President Donald Trump shifts the United States away from its support of Europe.

Defying the malaise that has plagued the German economy for the past two years, Rheinmetall has reported record growth since the start of the war in Ukraine, building new factories in just months, leading digitization efforts and creating thousands of jobs.

“An era of rearmament has begun,” Armin Papperger, the chief executive of Rheinmetall, said Wednesday on an earnings call with analysts. “It brings us growth prospects for the coming years that we have never experienced before.”

The company, which is in Düsseldorf, Germany, reported that its defense business grew 30% last year, contributing to sales that reached 9.8 billion euros ($10.6 billion). Rheinmetall is projecting sales in 2025 will grow as much as 40%, driven by a pledge from European leaders to increase military spending, after the Trump administration made clear that defending Europe was no longer a priority.

Rheinmetall’s stock has soared more than 1,000% since Russia invaded Ukraine in 2022. Shareholders, roughly half of whom are based in the United States or Britain, will receive a dividend of 8.10 euros per share for 2024, compared with 5.70 euros the year before, the company said.

The company is a key supplier of arms to Ukraine and is building plants there and in countries like Lithuania, Hungary and Romania to satisfy rising demand for its arms and ammunition. In addition to the standard 155 mm munitions used by NATO members, Rheinmetall makes battlefield equipment, from armored trucks and drones to the Leopard 2 tank’s 120 mm gun.

Even with the upswing in military spending in Europe, the United States remains a key market, Papperger said, calling it a “pillar of stability” for the defense industry. Rheinmetall’s U.S. subsidiary, American Rheinmetall Defense, is in Reston, Virginia, and operates eight factories across the United States.

The independence of its U.S. operations means the company is not directly affected by the tariffs. Papperger said cooperation with U.S. partners had remained friendly and collegial despite the political upheaval of the past weeks.

Papperger — who has spoken recently with leaders in the Pentagon and President Volodymyr Zelenskyy of Ukraine — stressed the importance of trans-Atlantic ties. “I caution against breaking completely with the United States, even if the tone has become more rough lately,” he said.

The potential ceasefire in Ukraine presents uncertainty for Rheinmetall, and Papperger said the company’s outlook would be adjusted after it became clear what the outcome of the talks might be.

Rheinmetall is also waiting to find out whether a defense-spending bill proposed by the new German government will win approval in parliament next week.

The company built a factory in Unterluss, Germany, in just 13 months — record time in a country where it was typical for firms to wait up to two years for permits to put up a new sign beside a public road — and an increase in military spending could spur further expansion at home.

One option would be to take over factories that are no longer needed by auto companies and their suppliers. Such a move would also benefit local communities dependent on industry to provide jobs for hundreds of engineers and technicians with skills that could transfer easily to defense.

For example, one option that has been floated is for Rheinmetall to take over a plant operated by Volkswagen near Osnabrück, which only barely survived the threat of closure last year. But until the German government orders more armaments, Papperger said he would not move ahead with such plans.