President Trump is weighing a military operation to extract nearly 1,000 pounds of uranium from Iran, according to U.S. officials, a complex and risky mission that would likely put American forces inside the country for days or longer.

Trump hasn’t made a decision on whether to give the order, the officials said, adding that he is considering the danger to U.S. troops. But the president remains generally open to the idea, according to the officials, because it could help accomplish his central goal of preventing Iran from ever making a nuclear weapon.

The president has also encouraged his advisers to press Iran to agree to surrender the material as a condition for ending the war, according to a person familiar with Trump’s thinking. Trump has been clear in conversations with political allies that the Iranians can’t keep the material, and he has discussed seizing it by force if Iran won’t give it up at the negotiating table.

Pakistan, Turkey and Egypt have acted as intermediaries between the U.S. and Iran. But Washington and Tehran haven’t yet engaged in direct negotiations to end the war.

NEWSLETTER TABLE TALK

Never miss a story.
Subscribe now.

The most important news & topics every week in your inbox.

“It’s the job of the Pentagon to make preparations in order to give the commander-in-chief maximum optionality. It does not mean the president has made a decision,” White House press secretary Karoline Leavitt said in a statement. The Pentagon didn’t comment and a spokesman for U.S. Central Command declined to comment.

On Sunday night, Trump told reporters that Iran must do what the U.S. demands or “they’re not going to have a country.” Referring to Iran’s uranium, Trump said, “They’re going to give us the nuclear dust.”

Before Israel and the U.S. conducted a series of airstrikes on Iran in June last year, the country was believed to have more than 400 kilograms of 60% highly enriched uranium, and nearly 200 kilograms of 20% fissile material, which is easily converted into 90%-weapons-grade uranium.

International Atomic Energy Agency Director General Rafael Grossi has said he thinks the uranium is mainly at two of the three sites that the U.S. and Israel attacked in June: an underground tunnel at the nuclear complex in Isfahan and a cache at Natanz. The Iranians have centrifuges to enrich uranium and the capability to set up a new underground enrichment site, experts said.

The president and at least some of his allies have said privately it would be possible to seize the material in a targeted operation that wouldn’t significantly extend the timeline of the war and still enable the U.S. to be done with the conflict by mid-April, according to the person familiar with the discussions.

Trump has told associates that he doesn’t want a protracted war . Some of his top aides are eager for him to focus on other matters, including the coming midterm elections, where polls are showing Republicans could face significant losses.

Any move to seize the uranium by force would be complex and dangerous, former U.S. military officers and experts said, ranking among the most challenging operations ordered by Trump. The potential operation, which would likely trigger retaliation from Iran, could also lengthen the war well beyond the 4-6 week time frame that Trump’s team has publicly outlined.

Teams of U.S. forces would need to fly to the sites, likely under fire from Iranian surface-to-air missiles and drones. Once on site, combat troops would need to secure perimeters so that engineers with excavating equipment could search through debris and check for mines and booby traps.

The extraction of the material would likely need to be conducted by an elite special operations team specially trained to remove radioactive material from a conflict zone. The highly enriched uranium is likely contained in 40 to 50 special cylinders that resemble scuba tanks. They would need to be put into transportation casks to protect against accidents. That could fill several trucks, said Richard Nephew, a senior research scholar at Columbia University and a former nuclear negotiator with Iran.

Unless an airfield was available, a makeshift one would need to be set up to bring equipment in and take the nuclear material out. The entire operation would take days or even a week to complete, experts said.

“This is not a quick in and out kind of deal,” said retired Gen. Joseph Votel , the former commander of U.S. Central Command and U.S. Special Operations Command.

U.S. troops could avoid such a dangerous operation if Iran agreed to hand over its uranium as part of a peace settlement. The U.S. has previously removed enriched uranium from a foreign country in a peaceful transfer. In 1994, the U.S. removed uranium from Kazakhstan in an operation dubbed Project Sapphire. In 1998, the U.S. and Britain were involved in an operation to remove highly enriched uranium from a reactor near Tbilisi, the Georgian capital. It was taken to a nuclear complex in Scotland.

Trump has declined to publicly say whether he would order the uranium-retrieval mission. On Saturday, he urged his followers on social media to watch Mark Levin’s Fox News show, during which the conservative commentator advocated for Trump “to get the uranium.”

Over the past week, Trump has sought a diplomatic resolution to the war, urging Iran to dismantle its nuclear work as part of a negotiated deal. Secretary of State Marco Rubio said last week that the U.S. can achieve its major objectives without ground forces .

Iran isn’t currently enriching uranium, U.S. officials have said, and would need to enrich it to weapons grade and also build a warhead or bomb if it wanted to become a nuclear weapons state. Iran also doesn’t have an intercontinental ballistic missile that can reach the American homeland, but could have dozens by 2035 should Iran choose to adapt its space launch vehicle, according to a projection last year by the Defense Intelligence Agency.

As the military continues striking targets in Iran, Trump is receiving briefings about the challenges of the uranium operation, U.S. officials said. The military is also preparing for other options should the president order them, including positioning quick-response Marine units and paratroopers from the Army’s 82nd Airborne Division in the region that could seize strategic locations such as an island off Iran’s southern coast, according to a U.S. official.

The Pentagon has many of the assets in the region needed to conduct a uranium extraction if ordered, and is considering deploying an additional 10,000 ground troops to give the president more options in the war, according to U.S. officials.

Asked at a Pentagon press conference earlier this month what the U.S. planned to do about Iran’s enriched uranium, Defense Secretary Pete Hegseth said he hoped Tehran would agree to relinquish it, but hinted the U.S. military had options to seize it if Iran refused.

“The president has kept his eye focused on nuclear capabilities,” Hegseth said on March 13. “We have a range of options, up to and including Iran deciding that they will give those up, which of course we would welcome.”

“I would not, never tell this group or the world what we’re willing to do or how far we’re willing to go, but we have options, for sure,” Hegseth added.

Write to Alexander Ward at alex.ward@wsj.com , Lara Seligman at lara.seligman@wsj.com , Annie Linskey at annie.linskey@wsj.com and Michael R. Gordon at michael.gordon@wsj.com