WASHINGTON (Reuters) - The Department of Homeland Security violated two court orders in the days after U.S. President Donald Trump issued a temporary travel ban on citizens of seven Muslim-majority countries, according to the department’s watchdog.

FILE PHOTO: U.S. Department of Homeland Security emblem is pictured at the National Cybersecurity & Communications Integration Center (NCCIC) located just outside Washington in Arlington, Virginia September 24, 2010. REUTERS/Hyungwon Kang/File Photo

DHS Inspector General John Roth summarized his findings in a letter dated Monday to three Democratic U.S. senators, saying he has been unable to release the full 87-page report, completed six weeks ago. He said the delay was due to a dispute with DHS higher-ups over redactions, which would “deprive Congress and the public of significant insights into the operation of the Department,” Roth said.

After the Jan. 27 order by the president, the U.S. Customs and Border Protection agency (CBP) “was very aggressive in preventing affected travelers from boarding aircraft bound for the United States, and took actions that, in our view, violated two separate court orders,” Roth said.

Trump banned the entry of citizens from seven Muslim-majority countries for 90 days. His order was issued with little warning to major U.S. agencies, sparking confusion at airports in the United States and around the world over its scope and impact.

Civil rights groups quickly challenged the travel ban, managing to block implementation of some of its key measures as protesters, lawyers and elected officials rushed to major U.S. airports where citizens of the seven countries had been detained.

At U.S. ports of entry, CBP officials largely complied with court orders blocking the ban, though they were hampered by a lack of guidance from superiors, Roth wrote in his letter.

CBP officials “had virtually no warning” that Trump was issuing his travel ban “or of the scope of the order, and was caught by surprise,” Roth said. Still, CBP officers at U.S. airports “attempted in good faith to obey court orders,” he said.

In one case, at Dulles International Airport near Washington, CBP stopped a departing airplane that was taxiing so an affected traveler could be admitted to the United States.

From Jan. 29 to Feb. 3, CBP instructed airlines to prevent Boston-bound passengers from the seven countries from flying to the United States in violation of an order by a federal court in Massachusetts.

All of the airlines except Lufthansa LHAG.DE followed CBP instructions. When Lufthansa's passengers arrived in Boston, they were allowed to enter, Roth said.

CBP also continued to issue “no board” instructions to airlines even after a separate nationwide federal court order on Jan. 31 blocked the agency from doing so, Roth said.

Top DHS officials are reviewing Roth’s report and may invoke a form of governmental privilege which he said “would prevent us from releasing to you significant portions of the report. I am very troubled by this development.”

Agency officials “conducted themselves professionally, and in a legal manner, as they implemented an executive order issued by the president,” said Tyler Q. Houlton, a DHS spokesman. Parts of the report are subject to “privileges afforded by well-recognized law,” he said since the travel ban’s implementation is subject to lawsuits and court orders.