Members of Turkey's armed forces said they had taken control of the country, but Turkish officials said the coup attempt had been repelled early Saturday morning in a night of violence that left at least 17 dead, according to state-run media.