Call it the biggest consolation prize in recent history of the state legislature. Democrats, outnumbered in both chambers, actually won the battle over immigration after losing out to the Republican supermajority on abortion and Voter ID legislation and deep cuts to public services, mainly health care and education.

In the last days, one of Gov. Rick Perry's emergency issues from the beginning of the legislative session — sanctuary cities — was in the list of dead bills. It may have been a timing issue, a victim of a stare-down between the chambers (the House and Senate both passed versions only to see them die in the opposite chambers), of 11th-hour phone calls from big money donors, or what some called unfunded mandates that were attached to the bill.

Whatever it was, the bill, which would grant law enforcement officers authority to check immigration status and enforce federal immigration laws and deny state money to law enforcement outfits that didn't follow state policy fell short, giving the minority party a reason to smile as they watched the Capitol in their rearview mirrors.

It wasn't all rosy news for those trying to block immigration bills, however. While most were watching the sanctuary cities measure, lawmakers quietly added a driver license requirement to a budget bill that means every Texan applying for a driver license will have to show proof of citizenship or legal residency. The officials giving out those licenses are allowed to ask for such papers now; they'll be required to once the new provision becomes law.

The Texas Tribune thanks its sponsors. Become one.

Business leaders rallied in opposition to the measure, saying it would lead to a steady decline of automobile purchases and increase the number of drivers without insurance. If the law, which would require more documented proof of someone’s legal status to obtain the IDs, takes effect, it could also affect voter turnout now that the state requires a photo ID to cast a ballot. But it's attached to a critical piece of budget legislation, and the governor's unlikely to veto it.

Texas Tribune donors or members may be quoted or mentioned in our stories, or may be the subject of them. For a complete list of contributors, click here.