The Sept. 11 terrorist attacks exposed the flaws in the U.S. immigration system, as well as in national security and the poor communication among federal agencies.

The flaws led to the creation, 10 years ago, of the Department of Homeland Security. It was, in the words of Homeland Security Secretary Janet Napolitano, the “largest reorganization of the federal government since [the Department of Defense].”

In 2002, Congress passed the Homeland Security Act, which designated the Department of Homeland Security as a Cabinet-level entity. It officially started functioning on March 1, 2003, integrating all or part of numerous federal departments and agencies.

President George Bush said at the time that DHS’s “primary mission is to protect our homeland.”

Over the years, DHS has had its share of controversy – most recently last month, with the disclosure that immigration officials released about 2,000 detainees from its custody because of the budget sequester. The White House sought to distance itself from the controversial move, saying it had been done without its input.

With immigration becoming center stage in the political debate, Immigration and Customs Enforcement, or ICE, also has come under fire from both sides of the debate.

Advocates of more lenient immigration policies assail the agency for being too aggressive and going after undocumented immigrants who, they say, are not criminals and do not pose national security threats. Proponents of tough enforcement say ICE is not aggressive enough.

ICE officials say they merely follow the mandate of the Obama administration and Congress.

James Ziglar, who was the last INS commissioner, said it was challenging to restructure immigration, and break it up into one agency focused on enforcement, another on services and another on the border.

“The break-up of the INS into three pieces and putting it together with Customs was very rocky at the start,” said Ziglar, who is a senior fellow at the Migration Policy Institute, adding that there were rivalries between some agencies. “But over the years they’ve been getting their act together.”

Ziglar said he was disappointed in the disproportionate attention given to enforcement – which he said had vastly improved under the DHS – over the services part of immigration.

“If we have comprehensive immigration reform and bring people to legal status, the burden and long-term management of that will fall on the U.S. Citizenship and Immigration Service. I don’t think Congress has paid adequate attention to that.”

A congressional audit last year showed the U.S. government had significantly improved homeland security but still lacked a system to know who is leaving the country and exactly what is inside luggage checked at airports.

"I don't think people understand what (DHS) does and no part of it really wins any respect from the public," charged Ben Friedman, a research fellow in defense and homeland security studies at the Cato Institute in Washington, told Fox News recently.

A DHS spokesperson told Fox News that over the last 10 years the department and its agencies have “matured,” to be able to take on everything from cyberthreats to natural disasters.

"DHS has become smarter about the threats we face and how to confront them by moving away from a one-size-fits-all approach toward a targeted and more effective risk-based approach,” the spokesperson said, pointing to multiple layers of security in the nation’s aviation system, as well as improvements in border and port security.

Seth Grossman, deputy general counsel for DHS, speaking at a Washington panel last November, said despite bumps along the road, DHS was learning from its mistakes and responding accordingly.

"(DHS) is relatively new. As far as agencies go, it is very recent," he said. "We're trying to move away from the one fix-it-all solution.”

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino

Elizabeth Llorente can be reached at elizabeth.llorente@foxnewslatino.com

Follow Elizabeth Llorente on https://twitter.com/Liz_Llorente

Like us on Facebook
Follow us on Twitter& Instagram