President Barack Obama defended his actions altering the U.S. immigration system, saying the changes would be "good for the economy" in a speech Tuesday in Chicago. Last week, the president altered immigration policy, enabling as many as 5 million undocumented immigrants to avoid deportation.

“Immigrants are good for the economy,” he said. “We keep hearing they’re bad.” He said allowing millions of immigrants to stay in the country would eventually raise wages for American-born workers, reduce the deficit and add $90 billion to the gross domestic product.

“Our immigration system has been broken for a long time,” he said, repeating a refrain he has used repeatedly during his presidency. “Families who try to come here the right way can be stuck in line for years.”

The president said that’s why it’s important to put a new plan into place, so people can “come out of the shadows” and “reap the rewards of being an American” while also adhering to the responsibilities that come with it.

But not every illegal immigrant is welcome to stay in the country. “Undocumented workers who broke our immigrations laws should be held accountable,” he said. Obama's remarks were interrupted by hecklers when he said “felons not families.” People began to shout from the crowd, and Obama cautioned them to quiet down and sit down.

2014-11-21T032811Z_1180713066_TM3EABK1Q9101_RTRMADP_3_USA-IMMIGRATION-OBAMA Mariana Bustamante (C) applauds after listening to President Barack Obama's televised speech during a viewing party at Alliance San Diego in San Diego, Nov. 20, 2014. Obama imposed the most sweeping immigration reform in a generation on Thursday, easing the threat of deportation for about 4.7 million undocumented immigrants and setting up a clash with Republicans. Photo: REUTERS/Sandy Huffaker

After he let several people shout for a moment, the president began to speak again. “You’re absolutely right. There have been [a] significant amount of deportations,” he said in response to the outbursts, “But what you’re not paying attention to is I just took an action to change the law.” His statement was met with cheers from the rest of the crowd. Then Obama added, “I understand why you might have yelled at me a month ago, although I disagree with some of your characterizations. It doesn’t make sense to yell at me now.”

After regaining control of the room, Obama said sending away millions of immigrants is “not realistic.” People who have been here for at least five years, have children who are citizens, are properly registered, pay taxes and pass a background check will be allowed to stay in the country. It is not “amnesty,” the president stressed.   

He briefly spoke about Ferguson, Missouri, where Officer Darren Wilson escaped indictment for the fatal shooting of unarmed teen Michael Brown. Rioters took to the streets Monday night, setting cars ablaze and looting businesses. Government officials, including the president, had urged protesters to remain peaceful.

Obama didn’t address the riots or the decision directly Tuesday. “America is the place where we can make it if we try,” he said. “It falls on us to hand down to our kids a country that lives up to that promise.”

Follow me on Twitter @mariamzzarella