How can free market libertarians rationalise their hardcore anti-immigration stance? After all, the last remaining barrier to economic liberty is the free movement of people, writes Chris Berg.

There are two versions of David Brat, the upstart who defeated House Majority Leader Eric Cantor in the Virginia Republican primary last week.

The first is a professor of economics at Randolph-Macon College in Virginia - a principled libertarian, dedicated to the cause of economic freedom.

Brat describes himself "a free-market guy", who believes the economy has been badly distorted by regulation. He runs something called the BB&T Program on Capitalism, Markets and Morality. He's passionately opposed to the mass surveillance program exposed by Edward Snowden. His academic research focuses on the intersection between Christian theology and the market economy.

That's the first version of Brat.

The second version is different - an anti-immigration warrior for the conservative right. He ran hard against Cantor on the latter's support for amnesty for the children of illegal migrants.

In this campaign, Brat argued immigration "lowers wages, adds to unemployment, and the taxpayer pays the tab for any benefits to folks coming in." (Just as the asylum seeker debate is in Australia, the question of amnesty for illegals is a proxy for the broader question about how open the United States should be to migration.)

For these sentiments he received endorsements from conservative firebrands like Ann Coulter - Brat was a candidate "true patriots should support with everything they have" - and Laura Ingraham.

It's not easy to bridge the divide between the two Brats. There's nothing "libertarian" or "free market" about an immigration crackdown. Quite the opposite.

The great free market victories over the last few decades have meant goods and capital can move around the world freely. This has raised living standards for everyone, rich and poor.

The last remaining barrier to economic liberty is the free movement of people.

It's as much a barrier of political philosophy as it is a barrier of legislation. As Brat demonstrates, even some of the most hardcore free market advocates have a blind spot when it comes to immigration.

Yet what could be more respectful of the tenets of individual liberty than allowing individuals and families to travel across national borders to make a better life for themselves?

And what could be more inconsistent than claiming to believe in the morality of liberty but then placing the strictest of possible limits on that liberty?

On The Drum in 2011 I argued that to prevent migration is to prevent the most powerful way to lift people out of poverty. Migration is a big deal economically too. Opening the world's borders could double the size of the world's economy, according to one famous estimate.

Yet one of the doyens of free market thought, the Nobel-winning economist James Buchanan, said the hardest essay he ever had to write was on whether governments could justifiably restrict immigration.

There are two objections to larger scale immigration that you commonly hear from the intellectual right. Neither are strong.

The first is that increased immigration is incompatible with the welfare state. In this view, allowing large scale migration is great in theory, but we have generous welfare programs. There's a risk some immigrants might migrate with the goal of hopping on social security. This argument was made by no less an authority than Milton Friedman.

But it's almost comically easy to resolve the apparent incompatibility: cordon off welfare programs to new migrants for a certain amount of time. In fact, that's exactly what we do in Australia (with the exception of refugees, who constitute a small fraction of the total migration intake).

The second objection is migrants may not assimilate to the national culture. This is not helped by the fact that many of the loudest pro-immigration voices are on the left and espouse a woolly sort of multicultural utopianism. But the point of a liberal framework of laws is that people of different values, preferences and beliefs can go about their business while everybody's rights are equally protected.

And let's not overestimate the cultural consensus among those born in the developed world. In Australia the Lowy Institute poll has been recording remarkably low support for basic things like democracy for many years.

Yet somehow the Commonwealth endures. As it would with a larger - even vastly larger - immigration intake.

(If your concern is that immigrants might vote for illiberal policies - that is, undermine the liberal legal framework - note that immigration and citizenship are different things.)

Let's be clear - Brat is more philosophically coherent than 99 per cent of the politicians out there. Any defeat of an established Washington politician is a win. In response to Brat's attack on immigration, Cantor surged hard to the right on amnesty. Self-interest beats principle.

And even taking Brat's views on amnesty into account, American politics will be better off with him in Congress rather than a beltway native like Cantor.

Brat ought to be praised for his scholarship on the connection between morality and free markets.

But it's also time for politicians who proclaim the virtues of liberty to discover its connection with the free movement of people.

Chris Berg is policy director at the Institute of Public Affairs. Follow him at twitter.com/chrisberg. View his full profile here.