President Donald Trump said Tuesday that he is "okay with" following laws that prevent him from destroying Iranian cultural sites, after previously threatening to target and attack them.

Trump originally mentioned Iran's cultural sites as part of a threat toward Tehran, which had vowed "harsh revenge" against the U.S. for killing its top military leader, Gen. Qasem Soleimani, in an airstrike days earlier.

Targeting cultural sites in that way could constitute a war crime under laws of armed conflict.

In the Oval Office on Tuesday, Trump expressed skepticism about the rules, but nevertheless said he would follow the law.

"They're allowed to kill our people, they're allowed to maim our people, they're allowed to blow up everything that we have, and there's nothing that stops them. And we are, according to various laws, supposed to be very careful with their cultural heritage," he said.

"And you know? If that's what the law is — I like to obey the law. But think of it, they kill our people, they blow up our people, but then we have to be very gentle with their cultural institutions," Trump said.

"But I'm okay with it. It's okay with me," he added.