Most Texans pick up a birth certificate by showing a driver’s license. But illegal immigrants lack many of the approved forms of identification, such as a license or foreign passport with a United States visa.

Illegal immigrants and their lawyers said local Texas registrars used to accept an ID card with a photograph issued to an immigrant by a foreign consulate. The matrícula, as the Mexican version of the consular ID is known, has been used by illegal immigrants to open bank accounts in Texas and receive other services. Although official Texas policy prohibited the use of consular IDs to obtain birth certificates, the prohibition was not strictly enforced until about 2013, when state officials in Austin began pressing local records clerks to follow the protocols, immigration lawyers said.

“People in Austin started tightening the screws,” said Efrén C. Olivares, a lawyer with the South Texas Civil Rights Project who represents the parents in the lawsuit.

The refusal to accept the consular IDs coincided with the tough-on-immigration stance of Texas Republican leaders, the influx of Central American immigrants at the border last summer and the state’s opposition to President Obama’s executive actions on immigration, which would give temporary reprieves from deportation to as many as four million immigrants and also permit them to work.

Illegal immigrants and their lawyers said Texas officials had been intentionally requiring IDs unavailable to them as part of their efforts to bolster border security. One couple who were denied a birth certificate for their 6-month-old daughter say in court documents that they were told by a McAllen official that the requirements became more strict to prevent illegal immigrants from obtaining legal status through their American-born children.

Mr. Obama’s executive actions on immigration, announced in November, would offer three-year deportation deferrals and work permits to millions of unauthorized immigrants who have a child who is an American citizen or legal permanent resident, and who have been living in the United States for five years and have no serious criminal records.