WASHINGTON (Reuters) - Turkey condemned as "unfounded and inappropriate" on Tuesday comments by Republican presidential hopeful Rick Perry that the country is ruled by Islamic terrorists and questioning whether it should remain in the NATO alliance.

Perry, the governor of Texas, also said during a Republican debate in South Carolina on Monday that the United States should eliminate all aid to its long-time ally.

"Obviously when you have a country that is being ruled by what many would perceive to be Islamic terrorists, when you start seeing that sort of activity against their own citizens, then yes - not only is it time for us to have a conversation about whether or not they belong in NATO, but it's time for the United States, when we look at their foreign aid, to go to zero with it," Perry said.

Perry's campaign said after the debate that Perry was responding to the Fox News questioner asking about issues such as violence against women.

Turkey noted that it had joined NATO when Perry was just 2 years old, and noted its long history of fighting terrorism, including co-chairing the Global Counterterrorism Forum with the United States.

"We strongly condemn the unfounded and inappropriate allegations expressed yesterday evening about our country during a debate held in South Carolina by Texas Governor Rick Perry, who is running for Republican Nomination for the 2012 U.S. Presidential Election," Turkish Foreign Ministry spokesman Selcuk Unal said in Ankara.

He noted that Perry trails in the race for the Republican nomination to oppose President Barack Obama's re-election next year and said, "This reflects the commonsense of the U.S. electorate."

In Washington, State Department spokesman Mark Toner said the Obama administration fundamentally disagrees with the assertion that Turkey is run by Islamic terrorists.

(Reporting by Yesim Dikmen in Ankara and Arshad Mohammed and Patricia Zengerle in Washington; Editing by Cynthia Osterman)