Updated

In her farewell speech Tuesday, Homeland Security Secretary Janet Napolitano expressed pride and regret when reflecting on her tenure.

The agency, she said, helped prevent terrorist attacks and respond to disasters. But she lamented the failure of the DREAM Act, which would have provided a path to legal status for many young immigrants living in the United States illegally, to pass in Congress. The full name of the measure is the Development, Relief, and Education for Alien Minors Act.

Napolitano, the third secretary of the department, will leave next week to take over as president of the University of California system. It is unclear when President Barack Obama will name a successor or who that person will be.

When Napolitano took the helm of the still-evolving department she made immigration reform a top priority and didn't mention terrorism during her first appearance on Capitol Hill. But immigration reform has remained elusive.

While she said she regretted the failure of the DREAM Act to become law, she touted the creation of the Deferred Action for Childhood Arrivals program, which halts deportations for many young immigrants who would have benefited from the DREAM Act.

Some of the highlights of her tenure include:

—An al-Qaida operative attempted to blow up a commercial jetliner over Detroit on Christmas Day in 2009. In the wake of the failed attack Napolitano declared that the "system worked," although the Obama administration immediately ordered an urgent overhaul of its terror screening systems for travelers.

—The April 15 bombing at the Boston Marathon, which left three people dead.

—The environmentally devastating oil spill in the Gulf of Mexico.

—Important changes to U.S. immigration policies.

—Hurricane Sandy devastated parts of the New Jersey shore and swamped large parts of New York City.

—The prostitution scandal that tainted the reputation of the Secret Service.

—Popularization of her "see something, say something" catchphrase.

—A period of rampant cyber break-ins of U.S. government computers blamed on China's government and others.

Napolitano said Tuesday that all of those disasters, attempted attacks and the successful assault in Boston have helped the department continue to be "flexible and agile."

"Each of these challenges tested us in new ways," Napolitano said. "They presented new opportunities for us to learn, grow, and get better at what we do as a department and a nation. And they allowed us to build on the knowledge gained from past events and refine our approach as the threats changed and our own understanding increased."

Based on reporting by The Associated Press.

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