Attorney General Jeff Sessions called Friday for an overhaul of the nation's "lax" immigration system for immigrants here legally and illegally, saying current policies enable violent crime and terrorist activity.

"Tens of thousands of crimes have been committed in this country that would never have happened if our immigration laws had been properly enforced and respected as they ought to be," Sessions said during a speech in Norfolk.

The speech, coming a day after the White House unveiled its immigration proposal, pressed President Trump's agenda by highlighting terrorism plots perpetrated by immigrants in the country illegally and echoing threats the Justice Department made this week to freeze federal funding for "sanctuary" jurisdictions.

But Sessions also lashed out against the country's legal immigration system.

"Those policies . . . are not promoting our national interest, but instead select the vast majority of legal immigrants without respect to merit," Sessions said.

"It doesn't favor education or skills," he said. "It just favors anybody who has a relative in America, and not necessarily a close relative."

Sessions repeated Trump's call for ending the system of allowing naturalized U.S. citizens to bring their relatives into the country, which critics call "chain migration," and for ending the "diversity lottery" for green cards.

"We saw two terrorist attacks in New York in less than two months," Sessions said. "They were carried out by people who came here as the result of the diversity lottery and chain migration. As a result, eight people were killed."

Sessions pointed to the merit-based immigration systems in Canada and Australia and said a Canadian official told him it worked well there.

"In those countries, future Canadians and future Australians are chosen based on their likelihood of assimilating, thriving and contributing to society as a whole," Sessions said.

Sessions cited a study that he said found that undocumented immigrants in Arizona are more than twice as likely to be convicted of crimes as "normal, regular Arizonans." He also referred to a Justice Department report released last week suggesting that 73 percent of terrorism convictions in the United States have involved people who were born in other countries.

"That includes Mahmoud Amin Mohamed El-Hassan, a Sudanese national who lived in Woodbridge, Virginia," Sessions said. "He was admitted to the United States in 2012 through chain migration as a family member of a lawful prominent resident. . . . Now he has been sentenced to 11 years in prison for attempting to help someone fly from Richmond to Syria to fight for ISIS. He planned on following him there later himself."

An expert on terrorism data has called the administration's terrorism study misleading because individuals captured overseas, extradited and brought to the United States to face trial are included in the same category as people who immigrated to the United States and were charged with terrorism offenses years ­later.

The attorney general again threatened to take federal grants away from cities, counties and states that have policies the Justice Department suspects could be unlawfully interfering with immigration enforcement. "These so-called sanctuary policies force police to release criminals back into the community, no matter what crimes they may have committed," Sessions said.

Sanctuary jurisdictions generally don't release undocumented immigrants when they would otherwise be held for crimes. Rather, they choose not to detain those who would otherwise be released.

Leon Fresco, who worked in the office of immigration litigation in President Barack Obama's Justice Department, said he found Sessions's speech "inconsistent."

"There's a fundamental tension in the speech where, on the one hand, there's an argument that we must enforce the law as written," Fresco said, referring to Sessions's statements about sanctuary cities.

But, Fresco said, when enforcement of the law has a "compassionate result," such as family migration and the diversity lottery, Sessions says that "it must be changed."