President Trump’s apocalyptic admonishment to North Korea over its threats to annihilate America suggested that he might be closer than ever to ordering an attack — without waiting for Kim Jong-un, the North Korean leader, to strike first.

Mr. Trump’s supporters have said that such a strike, should there be one, would be legally justified as an act of self-defense by the United States against a dangerous and irrational adversary. Others disagree, and many scholars of international law say the legal issues surrounding attacks in self-defense are complicated and subject to interpretation.

Here are some questions and answers on what can be considered legitimate self-defense under international law, and what the United States would need to demonstrate were it to invoke self-defense as the reason for attacking North Korea first:

How can a country even claim self-defense when attacking another country that has not attacked it?

The self-defense argument for such an attack is generally not recognized as valid. But there are situations in which a first strike can be interpreted as legally justified.

Michael N. Schmitt, a professor at the United States Naval War College and an affiliate at the Harvard Law School Program on International Law and Armed Conflict, said three basic requirements must be met: The other country must have the ability to attack; the other country’s behavior must show that an attack is imminent; and there must be no other ways to forestall it.