Democratic Sen. Joe Donnelly of Indiana suggested Tuesday evening that he was open to ending birthright citizenship for children of immigrants, a policy that President Donald Trump is pushing ahead of the midterm elections.

Donnelly, who is running in a tight race for re-election, framed himself as tough on undocumented immigrants during a debate against Republican challenger Mike Braun. The senator pointed to his support for a wall between the U.S. and Mexico and, as part of the 2013 comprehensive immigration reform bill, his support for more border agents.

Then Donnelly said he would review legislation that aimed to restrict birthright citizenship.

“We have to take a look at that legislation,” he said. Nodding to the 14th Amendment, the constitutional basis for birthright citizenship, he added, “So I’d want to see that legislation, make sure if was constitutional, and review it first.”

The bill would probably not be constitutional. And Trump’s vow on Monday to limit birthright citizenship by executive order was quickly shot down by legal experts and even members of his own party as an overreach of his authority.

Anyone born in the U.S. whose parents aren’t officials of a foreign government is an American citizen under the 14th Amendment, which was ratified by the states after the Civil War to extend rights and liberties to former slaves. That the amendment specifically applies to children of non-citizen immigrants has been affirmed by the Supreme Court. Legal scholars say changing birthright citizenship would require a constitutional amendment.

But Trump has some backers for the idea in Congress. Sen. Lindsey Graham (R-S.C.), who voiced support for such a constitutional amendment as far back as 2010, said Tuesday that he would introduce legislation to end birthright citizenship for babies born to noncitizen parents, which he called an “absurd policy.”

After the debate, Donnelly said in a written statement that the 14th Amendment is clear but the U.S. immigration system is broken. “As I have done in the past, I will work with both parties to find a solution that secures our borders and fixes our broken immigration laws,” he added.

Donnelly’s GOP challenger also said he would be open to birthright citizenship legislation.

“If Lindsey Graham is introducing it, I think it will be something I’ll take a look at,” Braun said. “I’m not going to say whether I support it or not until I read the legislation.”

Tuesday’s debate focused mostly on health care, with Braun claiming that he is the better candidate to protect people with pre-existing conditions ― even though he has supported Republican proposals to undo the Affordable Care Act’s protections for people with pre-existing conditions.

Donnelly has campaigned as a Democrat willing to sometimes break with his party to support the president, especially on immigration issues. He has repeatedly endorsed the idea of a wall on the Mexican border.

Republicans, however, have called Donnelly “Mexico Joe” because until last year, he held stock in a family business that operated a factory in Mexico.

The story has been updated with Donnelly’s post-debate statement.