U.S. President Donald Trump said he will issue a new version next week of his executive order banning citizens of seven mostly Muslim countries and all refugees from traveling to the United States.

At a news conference on Thursday, Mr. Trump once again blasted federal courts that blocked the implementation of his travel ban.

“We had a bad court, got a bad decision,” Mr. Trump said of the judicial actions that temporarily stopped his immigration ban.

The immigration order, issued on Jan. 27, led to confusion in U.S. airports and prompted international protests and complaints from businesses.

The Mr. Trump administration asked for a pause on Thursday in proceedings by the 9th U.S. Circuit Court of Appeals, which had sided with a lower court in halting Mr. Trump's immigration ban.

He said his new order would seek to address the issues raised by the court, even as he attacked its reasoning.

“The new order is going to be very much tailored to what Iconsider to be a very bad decision,” Mr. Trump said.

Mr. Trump's decision to issue a new executive order plunges court proceedings over his actions into further uncertainty. Separate from the appeals court proceedings, a Seattle federal judge on Wednesday ordered both Washington state and the Justice Department to submit initial plans for discovery in the case by next month.

Washington state Attorney-General Bob Ferguson has said he wants to depose Trump officials about their motives for the travel ban, which could help the courts decide whether it violates constitutional protections for religion. The Justice Department said it opposes discovery at a hearing last week.

Mr. Ferguson claimed a victory in the case on Thursday, after the Justice Department made a court filing announcing that there would be a new, rewritten order.

“Today's court filing by the federal government recognizes the obvious — the President's current executive order violates the Constitution,” Mr. Ferguson said, in a statement. “President Trump could have sought review of this flawed order in the Supreme Court but declined to face yet another defeat.”

Whenever Mr. Trump issues a new order, Washington state could revise its lawsuit if it believes that directive is unconstitutional as well.

Mr. Trump has said his directive was necessary to protect the United States from attacks by Islamist militants. It barred people from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen from entering the country for 90 days. Refugees were banned for120 days, except those from Syria, who were banned indefinitely.

The abrupt implementation of the order, however, plunged the immigration system into chaos, sparking a wave of criticism from targeted countries, Western allies and some of America's leading corporations, especially technology firms, which lean heavily on immigrant talent.

But Mr. Trump said the rollout had been “very smooth.” He said the order was needed to keep the country safe and that was the reason for its quick implementation.

If the administration had decided to spend a month crafting the order, “everything would've been perfect,” Mr. Trump said.

“The problem is we would've wasted a lot of time, and maybea lot of lives because a lot of bad people would've come in to our country,” he added.

The Justice Department court filing on Thursday said Mr. Trump's order would be “substantially revised” but did not provide details. Last week an congressional aide who asked not to be identified told Reuters that Mr. Trump might rewrite the original order to explicitly exclude green card holders, or permanent residents.