President Donald Trump signaled Sunday that he was not ruling out a retaliatory strike against North Korea in response to the isolated country’s overnight nuclear test, which he called “very hostile and dangerous to the United States.”

President Donald Trump, with first lady Melania Trump with him, responds, "We'll see," as he is asked a question about attacking North Korea after the Trump's attended services at St. John's Church in Washington, Sunday, Sept. 3, 2017. The president last week named today a National Day of Prayer for victims of Hurricane Harvey. (Susan Walsh/AP)

People watch a TV news program showing North Korean leader Kim Jong Un at the Seoul Railway Station in Seoul, Sunday, Sept. 3, 2017. North Korea said it set off a hydrogen bomb Sunday in its sixth nuclear test, which judging by the earthquake it set off appeared to be its most powerful explosion yet. The signs read "North Korea, important announcement." (Ahn Young-joon/AP)

WASHINGTON — President Donald Trump signaled Sunday that he was not ruling out a retaliatory strike against North Korea in response to the isolated country’s overnight nuclear test, which he called “very hostile and dangerous to the United States.”

Asked as he left church services whether he was planning to attack North Korea after a nuclear test that defied his blunt warnings, Trump told reporters, “We’ll see.”

Trump’s response to North Korea’s announcement that it had detonated a hydrogen bomb that could be attached to a missile capable of reaching the mainland United States included an admonishment of South Korea for its handling of the crisis.

Trump is convening a meeting of his national security team later Sunday to discuss the U.S. strategy, while Treasury Secretary Steven Mnuchin said he is drawing up tough new economic sanctions to further isolate North Korea.

In a pair of tweets issued Sunday morning, Trump wrote: “North Korea has conducted a major Nuclear Test. Their words and actions continue to be very hostile and dangerous to the United States … North Korea is a rogue nation which has become a great threat and embarrassment to China, which is trying to help but with little success.”

Trump also scolded South Korea, a longtime U.S. ally, stating “South Korea is finding, as I have told them, that their talk of appeasement with North Korea will not work, they only understand one thing!”

Trump warned in a fourth tweet, “The United States is considering, in addition to other options, stopping all trade with any country doing business with North Korea.”

He said he would be meeting with Defense Secretary Jim Mattis, White House chief of staff John F. Kelly and other military leaders to discuss options.

“The national security team is monitoring this closely,” White House press secretary Sarah Huckabee Sanders told reporters. “The president and his national security team will have a meeting to discuss further later today. We will provide updates as necessary.”

After speaking with Trump on Sunday morning, Mnuchin called North Korea’s nuclear test “unacceptable behavior” and said the United States was likely to impose stricter sanctions on Kim Jong Un’s government and further pressure China, in particular, to “cut off” North Korea.

“We’ve already started with sanctions against North Korea, but I’m going to draft a sanctions package to send to the president for his strong consideration that anybody who wants to do trade or business with them is prevented from doing trade or business with us,” Mnuchin said on “Fox News Sunday.”

“We are going to work with our allies, we’ll work with China, but people need to cut off North Korea economically. This is unacceptable behavior.”

The tumult in the region comes amid escalating economic tensions with South Korea. Trump is considering withdrawing the United States from a free-trade agreement with South Korea, a long-standing economic and diplomatic partner of the United States.

The move would be in keeping with Trump’s campaign promise to end what he considers unfair trade competition from other countries, but the president’s advisers have cautioned a withdrawal from the agreement would strain ties with South Korea amid the mounting North Korean nuclear crisis.

Asked by Fox anchor Chris Wallace whether Trump would pull the United States out of the agreement, Mnuchin said, “The president has made clear that where we have trade deficits with countries, we’re going to renegotiate those deals.” He added that there have been “no decisions” yet with regard to the trade accord with South Korea.

North Korea’s nuclear test came just a few hours after Trump spoke with Japanese Prime Minister Shinzo Abe, a key ally in the region.

In a Saturday evening phone call, the two leaders discussed “ongoing efforts to maximize pressure on North Korea,” according to the White House.

“The two leaders reaffirmed the importance of close cooperation between the United States, Japan and South Korea in the face of the growing threat from North Korea,” read a statement from the White House.

Trump also spoke recently with South Korean President Moon Jae-in. In a call on Friday, the two leaders talked about “our coordinated response to North Korea’s continued destabilizing and escalatory behavior,” according to the White House, which said Trump and Moon agreed conceptually to South Korea purchasing billions of dollars in U.S. military equipment.

North Korea’s testing of its most powerful nuclear device yet comes just 3 1 / 2 weeks after Trump warned Kim that his continued nuclear provocations would be “met with fire and fury like the world has never seen.”

Initially, North Korea seemed to back down from its threat of a nuclear strike in Guam, where many U.S. military are stationed. Trump said of Kim at an Aug. 22 rally in Phoenix, “I respect the fact that, I believe, he is starting to respect us.”

That assessment turned out to be premature. North Korea’s test this weekend drew alarm from both Republican and Democratic lawmakers.

“North Korea right now is the most dangerous place on the face of the planet,” Sen. Ted Cruz, R-Texas, said on ABC’s “This Week.” Cruz said of Kim, “He is radical, he is unpredictable, he is extreme, and he is getting more and more dangerous weapons.”

Although Cruz said he would chose his words differently than Trump, the senator defended the president’s bellicose rhetoric.

“I think the president is right that Kim Jong Un and other bullies only understand and respect strength, that weakness, that appeasement encourages this action,” Cruz told ABC anchor Martha Raddatz.

Rep. Joaquin Castro, D-Texas, differed, saying Trump’s rhetoric is inadvisable.

“I don’t think that it’s helpful to get into a Twitter shouting match with a 32-year-old dictator, Kim Jong Un, in North Korea,” Castro told Raddatz in a separate interview. He said Trump should “let his diplomats and his military generals and others handle this situation.”

Gen. Michael Hayden, a former director of the CIA and the National Security Agency, stressed that Trump’s tweets are fouling up his otherwise respectable plan to get tough on North Korea.

“You gotta watch the tweets,” Hayden said on CNN’s “State of the Union.” “Mr. President, this is not a manhood issue; this is a national security issue. Don’t let your pride get in the way of wise policy here.”

Senate Foreign Relations Committee Chairman Bob Corker, R-Tenn., said he spoke Sunday morning with Kelly about the situation.

“We stand ready to work with the administration to support a comprehensive strategy that not only places an emphasis on deterrence but also empowers our allies and partners in the region, who must do more to confront this threat,” Corker said in a statement.

Sen. Jeff Flake, R-Ariz., said that “there are no good options” to manage the North Korea crisis but that “harsh rhetoric” does not appear to help slow Kim’s nuclear program.

Flake said that ending the U.S.-South Korea trade agreement, as Trump is considering, would be inadvisable.

“I don’t think that that would be good in any circumstances,” Flake said on CNN’s “State of the Union.”

“Now it’s particularly troubling given what South Korea is faced with. I think we need to do more trade, not less, and withdrawing from trade agreements is a very troubling sign.”