Secretary of Homeland Security John Kelly, right, and U.S. Immigration and Customs Enforcement acting director Thomas Homan answer question about the immigration order’s implementation. (Shawn Thew/European Pressphoto Agency)

The Department of Homeland Security Office of Inspector General announced late Wednesday that it will conduct a broad review of the implementation of President Trump’s controversial refu­gee ban, looking particularly at whether employees engaged in misconduct or failed to comply with court orders.

The review came in response to requests from Sens. Richard J. Durbin (D-Ill.) and Tammy Duckworth (D-Ill.) and whistleblower complaints, said Arlen M. Morales, a spokeswoman for the inspector general’s office said. She said the inspector general will produce a report, likely in three to five months, to Congress and the public.

Spokesmen for the White House and the Department of Homeland Security did not immediately return messages late Wednesday night.

The president’s executive order — which temporarily bars refugees and people from seven Muslim-majority countries from entering the United States — was met with nationwide protests and legal challenges soon after it took effect Friday night. Customs and Border Protection officers initially were detaining and deporting valid visa and green-card holders after they arrived at U.S. airports — some even after federal judges ordered the practice to stop.

DHS officials have defended their implementation of the order, and the government said as of late Tuesday night that no one remained in detention. But civil liberties lawyers have said they are still pressing for more thorough compliance with court rulings.

They are pushing, for example, for a list of those who were detained, and they have fielded reports of people being coerced into signing away their documentation. DHS officials have conceded that they made some mistakes in the rapid implementation of the order and said that they would investigate concerns brought to their attention.

Inspector General John Roth’s review, reported by the Intercept earlier Wednesday, will not assess whether Trump’s executive order is constitutional. That will be a matter left to the courts. Depending on what the review finds, though, it might lay out a narrative counter to previous assertions from the department and the White House.

Trump wrote on Twitter on Monday that Homeland Security Secretary John Kelly “said that all is going well with very few problems,” though he later added there was “nothing nice about searching for terrorists before they can enter our country.”

Inspectors general are supposed to operate independently of the president and the agencies they oversee, and they typically are kept on through different administrations. The Trump transition team, though, initially contemplated holding over inspectors general only “on a temporary basis,” according to an email from a member of the Trump transition team. The team later reassured some inspectors general they would not be forced from their posts.