NORTH CHARLESTON, South Carolina — Republican presidential hopeful Donald Trump and his top challenger Ted Cruz clashed sharply on Thursday over the Texas senator’s Canadian birth and the real estate mogul’s “New York values” during a tense debate weeks before voters start to pick the party’s nominee to run for the White House in November.

Cruz, who was born in Calgary, Alberta, to a U.S. citizen mother and a Cuban father, accused Trump of bringing up his birthplace simply because Cruz was leading some polls in Iowa, where on Feb. 1 it will be the first state to hold a contest.

Cruz said Trump, who led the movement questioning whether the Hawaiian-born President Barack Obama was really born in the United States, had asked his lawyers to look into the issue of Cruz’s birth in September and concluded there were no issues.

“Since September, the Constitution hasn’t changed, but the poll numbers have,” Cruz said. “And I recognize that Donald is dismayed that his poll numbers are dropping in Iowa, but the facts and the law here are really clear.”

Trump said Democrats would sue if Cruz were on the Republican ticket, putting their party’s chances of winning at risk.

“There’s a big question mark on your head,” Trump told his rival, with whom he has had friendly relations over the past year on the campaign. “The Democrats are going to bring a lawsuit.”

He urged Cruz, who is a lawyer, to ask a court to put the question to rest.

“I’m not going to be taking legal advice from Donald Trump,” Cruz retorted.

Trump, who has proven to be a master at finding a perceived weakness in an opponent, has made an increasing issue of Cruz’s Canadian birth, suggesting it violated the U.S. Constitution’s requirement that only “natural born citizens” can be president.

The two men have had largely friendly interactions since the campaign started, with Cruz steering clear of criticizing Trump during his rise to the top of the national polls.

That ended Thursday.

In addition to fighting back over his presidential eligibility, Cruz accused Trump of not being a conservative because he was born in New York and still lives there.

“Everyone understands that the values of New York City are socially liberal, are pro-abortion, are pro-gay marriage,” Cruz said.

Trump objected to Cruz’s comments on his city by referring to the Sept. 11, 2001 attacks. He said New Yorkers came together to support each other after thousands were killed and cleaned up the site of the destroyed 110-story World Trade Center’s twin towers, enduring “the smell of death” for months.

“And I have to tell you, that was a very insulting statement that Ted made,” Trump said.

The sixth Republican debate, at the North Charleston Coliseum in the swing state of South Carolina, takes place at a tense time for the Republican field.

The top seven candidates ranked by Republican voters took part in the debate: Trump, Cruz, Florida Sen. Marco Rubio, retired neurosurgeon Ben Carson, former Florida Gov. Jeb Bush, New Jersey Gov. Chris Christie and Ohio Gov. John Kasich.

Cruz has taken the lead in some polls of Iowa Republican voters. A victory there could propel him higher in the national race.

A Reuters/Ipsos rolling national poll on Jan. 12 showed Trump had 39 percent of the vote, Cruz 14.5 percent, Bush 10.6 percent, Carson 9.6 percent, while 6.7 percent favored Rubio, once viewed by the Republican establishment and many donors as a rising star.

The other candidates sought to gain traction in the debate with criticism of Obama’s policies on guns and also threw barbs about his State of the Union address on Tuesday.

In that speech, Obama sought to offer a more optimistic vision for America’s future and he singled out Trump, without naming him, for calling on the United States to ban Muslims temporarily from entering the country.

Bush urged Trump to change his views on the issue. Trump, who noted that his poll numbers rose after making that policy proposal, said his mind was made up.