An analysis by the Pew Research Center estimates that roughly 10.5 million immigrants in the United States were here illegally in 2017.

That number of "unauthorized immigrants" represented 23 percent of the total U.S. foreign-born population of 45.6 million. Lawful immigrants comprised the vast majority with 35.2 million, or 77 percent. The remainder included lawful permanent residents (12.3 million) and temporary lawful residents (2.2 million), according to the analysis.

The report, posted Friday, came as presidential candidates offered ideas for tackling a growing immigration crisis.

Pew reached those numbers by estimating how many immigrants in the country were legal and subtracting that figure from the total number of migrants -- found through a census or national survey.

ANTI-ICE PROTESTERS PULL DOWN AMERICAN FLAG, RAISE MEXICAN FLAG, VANDALIZE 'BLUE LIVES MATTER' FLAG

The number of illegal immigrants has become the subject of debate in recent years as differing estimates have emerged.

Many organizations have used Census data to estimate migration levels, but a joint study between Yale University and the Massachusetts Institute of Technology found much higher numbers through a different methodology.

Noting that illegal immigrants had an incentive to stay undetected, an MIT professor looked at the issue but bypassed population surveys and looked at data including border apprehensions and visa overstays. The researchers reached a figure of about 22.1 million.

CLICK HERE TO GET THE FOX NEWS APP

According to another Pew study, the majority of illegal immigrants in 2017 overstayed their visas. According to Pew, 4.9 million of the reported 10.5 million unauthorized immigrants were Mexican in 2017. The number of unauthorized immigrants from Asia increased by 130,000 and those from Central America rose by 400,000 from 2007.