Conservative commentator Charles Krauthammer predicted that Republicans in Congress will have to pass legalization for the millions of illegal immigrants in the U.S. in exchange for building Donald Trump's proposed Mexican border wall.

In his column Friday, Krauthammer, a longtime Trump critic, said that now the GOP controls all of Congress and the White House, the party can pass big legislation, among the first of which will be on immigration.

"Beyond the undoing [of President Obama's agenda], there's now the prospect of doing," he said. "Serious border enforcement, including a wall, for example. That's not only a good in itself, it would offer leverage in a grand bargain that would include eventual legalization of resident illegal immigrants, an idea supported (according to the exit polls) by more than 7 in 10 voters."

Throughout his campaign, Trump has pledged to supporters that he would "build a wall" and "make Mexico pay for it." But he has sent mixed signals on what would happen to illegal immigrants already in the country, sometimes insisting they would all be deported and other times saying "we're going to see" what to do about them.