The exchange came while Clinton was responding to a question about open borders. After saying that she wants a global energy market, Clinton slammed WikiLeaks for getting information from Russian hackers.
"What's really important about WikiLeaks is that the Russian government has engaged in espionage against Americans," Clinton said, adding that the Russians then gave that information to WikiLeaks "for the purpose of putting it on the internet."
Clinton later asked if Trump would "admit and condemn that the Russians are doing this and make it clear that he will not have the help of Putin in this election."
Trump initially deflected Clinton's challenge to reject the alleged Russian hack, instead repeatedly insisting that Clinton wants open borders. However, when Clinton referenced Trump moments later and said Putin would "rather have a puppet as president of the United States," the Republican nominee fired back.
"You're the puppet," he said.
Clinton then continued her attack, saying that Trump "encouraged espionage against our people, that you are willing to spout the Putin line," adding that it is an "unprecedented situation" to have a foreign government attempt to "interfere in our election."
Trump responded by slamming Clinton's record and calling into question whether the Russians really were behind hacks that ultimately provided information to WikiLeaks.
"I don't know Putin," Trump said. "I never met Putin. This is not my best friend. But if the United States got along with Russia, wouldn't be so bad. Putin has outsmarted her and Obama at every single step of the way."