THE REPUBLICAN PARTY’S incoherence on illegal immigration was on vivid display last week in Tampa, where delegates gathered to draft their party’s official platform.

The platform amounts to a declaration of war on the 11 million undocumented immigrants in the country. It embraces laws like those in Arizona and Alabama that are intended to make life so miserable for undocumented workers that they will “self-deport,” in Mitt Romney’s memorable phrase, and it slams the Obama administration for trying to block those measures. The Republican Party would punish cities that look the other way on immigration enforcement and universities that grant in-state tuition rates to undocumented students, in both cases by withholding federal funds.

In addition, the party of free enterprise and small government would force every employer in the country — in many cases against its will — to electronically verify the immigration status of job applicants. At a time when illegal border-crossing from Mexico is at a 40-year low, the GOP would complete the 2,000-mile border fence, at a cost of hundreds of millions of dollars.

On the other hand, the GOP platform tips its hat to reality by recognizing that the nation needs low-skilled labor and that there is no adequate legal mechanism to supply it. It therefore calls for a guest-worker program.

But how does it make sense to embrace such a program while pressing to deport 11 million immigrants, most of whom have been in this country for more than a decade and in many cases are integral parts of American communities and parents of American citizens? The whole thing amounts to both an acknowledgment that the job market demands low-wage immigrant workers and a rejection of those who came to this country precisely in response to that demand.

To grasp the full absurdity of the GOP’s position, suppose for a moment that the party actually carried out its threat to drive out 11 million illegal immigrants, including 7 million in the job force. Imagine the scope, cost and administrative complexity of the guest-worker program that would then be required to replace them. It’s hard to conceive of a more wide-ranging expansion of government.

The GOP’s contradictions on immigration have been evident for a number of years. In 2000, the party platform called for expanding the migrant-farm-workers program. In 2004, bowing to President George W. Bush’s support for legalizing millions of undocumented immigrants, the party backed a program that would allow migrants to “come out of the shadows and to participate legally in America’s economy” — if only temporarily. Then in 2008, hard-liners slammed the door shut again, pushing through an enforcement-only platform.

Perhaps this year’s GOP platform should count as a step forward, for recognizing the market demand for low-skilled labor. But by refusing to devise any alternative to deportation for the undocumented immigrants already here, the party remains in thrall to extremists.