While some provisions in the new order have been relaxed, Mr. Trump and immigration hard-liners in the administration are expected to assert that the new version is no less strict because it retains a temporary ban on refugees.
The senior administration official said Iraq had been removed from the travel ban after Secretary of State Rex W. Tillerson had discussions with the Iraqi government about its vetting processes. The Iraqi officials insisted that their vetting system was thorough enough on its own.
Some American officials had expressed concern that the restrictions would have affected Iraqis who had worked with the American military as interpreters or in other roles and sought to come to the United States.
The official said the executive order is expected to be signed on Monday. David Lapan, a spokesman for the Department of Homeland Security, referred all questions about the new executive order to the White House.
Mr. Trump’s previous order — which temporarily barred visitors from Iraq, Syria, Sudan, Iran, Somalia, Libya and Yemen — set off chaos and confusion at airports around the world. The new order retains a temporary travel ban on the six countries other than Iraq.
After the first order was issued in January, passengers, many of them with green cards that allow them to live and work in the United States, were barred from flights into the country. Other people with visas were suddenly unsure if they would be allowed into the United States, and many of those who managed to arrive were stopped at airports.
While the new restrictions are intended to withstand legal scrutiny, they are likely to set off similar court challenges.
The previous executive order was criticized by several former high-ranking diplomatic and security officials, who said there was no national security purpose for the travel ban.
Trump administration officials, including John F. Kelly, the homeland security secretary, defended the previous restrictions, saying they were needed because the countries listed did not have vetting systems in place that could guarantee that immigrants and other travelers from those nations did not pose a threat to the United States.
“I believe that the travel pause from all of those countries will give us time to evaluate those countries and the information they can provide us, which will ultimately lead to safety for the American people,” Mr. Kelly told a Senate committee last month.
But an intelligence assessment from Mr. Kelly’s own department said there was little evidence that those travelers posed an unusual threat.
The three-page report found that “country of citizenship is unlikely to be a reliable indicator of potential terrorist activity.”
The assessment, first reported by The Associated Press, found that only a small number of people from the seven countries had been involved in terrorism-related activities in the United States since the Syrian civil war began in 2011.
The report also found that in the past six years, the terrorism threat had reached much more widely than the seven countries listed: People from 26 countries had been “inspired” to carry out attacks in the United States, it said.
The new order is the first of several security measures planned for America’s borders. Mr. Trump has ordered the Department of Homeland Security to hire an additional 5,000 Border Patrol agents, and Customs and Border Protection has begun accepting design proposals for a wall along the border with Mexico.
Mr. Kelly said the administration was considering requiring foreign visitors to provide lists of the websites they have visited. This would enable intelligence officials “to get on those websites to see what they’re looking at,” he told senators last month.
The United States also made changes to the visa waiver program in 2016 that made it harder for travelers to enter the United States from Europe if they had dual citizenship from Iran, Iraq, Sudan or Syria, or had visited one of those countries, or Libya, Somalia or Yemen, since 2011.