By Juan Castillo

AUSTIN, Texas –– A lawsuit contends the state of Texas is routinely discriminating against the U.S.-born children of undocumented immigrant parents by denying them birth certificates.

According to the civil lawsuit filed Tuesday in U.S. District Court in Austin, the Texas Department of State Health Services has denied birth certificates to U.S. citizen children on the border whose parents lack citizenship or legal status.

In doing so, the state is punishing the children for the way their parents entered the country, Jennifer Harbury, an attorney with Texas Rio Grande Legal Aid, told NBC News. The legal aid group and the Texas Civil Rights Project are representing six U.S.-born children and their Mexican citizen mothers in the lawsuit.

“It’s not up to the state to decide on immigration policy. This is a federal issue,” Harbury told NBC. “The state of Texas has to accommodate these women. They can’t disenfranchise them.”

The lawsuit asks the court to declare the state’s practice unconstitutional.

A spokeswoman for the state health services agency said federal agencies do not recognize a Mexican consular-issued ID known as the matricula consular because Mexican consulates don’t verify or authenticate source documents, the San Antonio Express-News reported. Carrie Williams said the state’s policy to require more than the matricula consular to verify identify has been in place since 2008.

But Harbury said the state did not begin enforcing its policy until late last year. That was about the same time a surge of pregnant women and unaccompanied children fleeing Central America poured into the Rio Grande Valley of South Texas, near the Mexican border, the Express-News reported.

Without a birth certificate for their children, parents face considerable difficulties or barriers to enroll them in school, give consent for their medical care or receive other services U.S. citizens are eligible to receive.

“It is number one, the cornerstone proof of the parent-child relationship and the cornerstone official proof that the child was born here,” Harbury said. “They shouldn’t have to spend months trying to scramble for medical care, school enrollment and educational projects. They need to get their benefits as U.S. citizens.”

Harbury said that until last fall, mothers were able to obtain birth certificates for their children with either or both a matricular consular or a passport. Only recently, she said, has the matricula been denied, and the state has asked instead for a foreign passport but only it if contains a valid U.S. visa.

“The very obvious accommodation is to accept the passport,” Harbury said. “If they won’t take it without a visa, clearly the intent is to discriminate against the women.”

The U.S. House recently held a hearing on questioning the constitutional guarantee of citizenship to all children born in the U.S. and whether that should continue. Two Republicans, Rep. Steve King of Iowa and Sen. David Vitter of Louisiana have filed bills to repeal it, although neither has moved forward.

The Texas lawsuit says scores of women from Mexico and Central America have been denied birth certificates for their children.

It cites the case of one of the plaintiffs, Maria Isabel Perales Serna, a Mexican citizen who as a young adult fled to Texas to escape an abusive husband. According to the lawsuit, Perales gave birth in Texas to a daughter, now 14. To obtain the birth certificate for the child, Perales merely presented her matricula issued by the Mexican consulate.

In November, 2014, after giving birth in a McAllen, Texas hospital, Perales took her matricula and Mexican passport to the state Vital Statistics office. Both were rejected. According to the lawsuit, the state said it could accept another form of identification, a current Mexican-issued voter registration card, which Perales did not have. She can only obtain one by returning to Mexico at great risk to her safety, the lawsuit says.

Follow NBC News Latino on Facebook and Twitter