A statement from Italian police said that the two Americans had confessed to stealing a bag from an Italian. They were demanding 100 euros ($111) and a gramme of cocaine for its return.
The victim of the theft tipped off the police, but when the two officers went to arrest the pair, one of them pulled a knife.
Italian media reports, citing investigators, said that the two US teenagers told police that the man they had stolen from had sold them aspirin powder instead of cocaine.
The suspect who confessed to stabbing Cerciello said he had taken the officers for friends of the alleged dealer and had panicked.
Police said surveillance cameras helped them track the pair to their four-star hotel where they arrested them. Their bags were packed and they had been planning to fly home that same evening.
Officers found a large knife hidden in the false ceiling of their hotel room and seized clothing that the pair were thought to have been wearing on the night of the murder.
Prosecutors in Rome are holding them on suspicion of aggravated homicide and attempted extortion.
The American who confessed to killing remained silent during a court hearing in front of a judge on Saturday afternoon, his lawyer told local media.