AAP

US Republican Party presidential nominee Donald Trump has praised Turkish President Recep Tayyip Erdogan for his handling of last week's failed coup.

"I give great credit to him for being able to turn that around," Trump said in an interview to The New York Times.

The purge after the failed coup, which left more than 260 people dead, saw more than 50,000 civil servants fired, suspended or detained.

On Wednesday night, Turkey imposed a three-month-long state of emergency.

Asked if Erdogan was exploiting the coup attempt to get rid of his enemies, Trump said "I don't think we have a right to lecture".

"Look at what is happening in our country. How are we going to lecture when people are shooting policemen in cold blood?"

Trump also said in the interview that he would raise questions about US obligations to fellow NATO allies.

If Russia attacked the Baltic countries, Trump said he would determine whether or not to assist them only after reviewing whether those countries "have fulfilled their obligations to us".

"We are going to take care of this country first, before we worry about everyone else in the world," he said.

The nominee has in the past suggested a diminished role for the US in NATO, saying membership costs too much.