WASHINGTON -- After Donald Trump encouraged Russia to find and make public missing emails deleted by his presidential opponent, Hillary Clinton, an instant debate exploded over hacking and his urging of a foreign government to meddle in American politics.

Shortly after Trump's extraordinary remarks Wednesday, his Republican running mate, Indiana Gov. Mike Pence, took a different tack and warned of "serious consequences" if Russia interfered in the election.

Democrats -- and some Republicans -- quickly condemned the remarks by the Republican presidential standard-bearer.

They came as the Democrats met on the third day of their national convention in Philadelphia, where Clinton will accept the presidential nomination Thursday night to face Republican Trump in November.

Trump's comments raised the question of whether he was condoning foreign government hacking of U.S. computers and the public release of information stolen from political adversaries -- actions that are at least publicly frowned upon across the globe. His brief remarks managed to divert attention from an embarrassing leak of other hacked emails that exposed sensitive internal political communications that had divided Democrats.

"Russia, if you're listening, I hope you're able to find the 30,000 emails that are missing," Trump said. He was referring to emails on Clinton's private server that she said she deleted -- because they were private -- before turning other messages over to the State Department. The Justice Department declined to prosecute Clinton over her email practices, but FBI Director James Comey called her "extremely careless" in handling classified information as President Barack Obama's secretary of state.

The Clinton campaign called Trump's statement the "first time that a major presidential candidate has actively encouraged a foreign power to conduct espionage against a political opponent."

At a news conference in Doral, Florida, after Trump's initial remarks, he was asked whether he had any qualms about asking a foreign government to hack into computers in the United States. Trump did not directly respond except to say, "That's up to the president. Let the president talk to them."

He later added: "If Russia or China or any other country has those emails, I mean, to be honest with you, I'd love to see them."

Trump's invitation was immediately contradicted by his running mate. Pence condemned any possible cyberespionage, breaking from Trump for the first time since being selected to run with him.

"If it is Russia and they are interfering in our elections, I can assure you both parties and the United States government will ensure there are serious consequences," Pence said in a statement.

At the convention, Leon Panetta, former CIA director and defence secretary, blasted Trump's remarks, saying that Trump is "asking a U.S. adversary to engage in hacking or intelligence efforts against the United States of America to affect an election."

Stephen Miller, senior policy adviser for Trump, battled back, saying in a statement: "It is alarming that Leon Panetta would, through his silence, excuse Hillary Clinton's enablement of foreign espionage with her illegal email scheme and her corrupt decision to then destroy those emails and dissemble her 'private' server to hide her crimes from the public and authorities."

Brendan Buck, a spokesman for Republican House Speaker Paul Ryan said bluntly: "Russia is a global menace led by a devious thug. Putin should stay out of this election."

A Trump campaign communications adviser, Jason Miller, sought to clarify Trump's statements, saying on Twitter that Trump never urged or invited Russia to hack Clinton's emails. Instead, he said, Trump was "clearly saying" that if Russia or anyone else already had Clinton's deleted emails they should share them with the FBI.

Trump never mentioned the FBI in his comments.

It was not immediately clear where or how Clinton's deleted emails might be recovered, unless an adversary had previously hacked the computer server she operated in the basement of her home in Chappaqua, New York, before she had deleted the messages.

The Associated Press, which discovered the basement server's existence in March 2015, previously reported that it was connected to the internet in ways that made it more vulnerable to hackers. The FBI concluded it was possible hackers broke into her server but found no direct evidence.

Wednesday's exchange occurred hours after Obama identified Russia as almost certainly responsible for hacking the Democratic National Committee in a different case. WikiLeaks published on its website last week more than 19,000 internal emails stolen from the DNC earlier this year. The emails showed DNC staffers supporting Clinton when they were publicly promising to remain neutral during the primary elections between Sen. Bernie Sanders and her.

The head of the DNC, Debbie Wasserman Schultz, resigned over the disclosures.

Trump cast doubt on whether Russia was behind that hack. He said blaming Russia was deflecting attention from the embarrassing material in the emails.

"Russia has no respect for our country, if it is Russia," Trump said. "It could be China. It could be someone sitting in his bedroom. It's probably not Russia. Nobody knows if it's Russia."

Obama traditionally avoids commenting on active FBI investigations, but he told NBC News on Tuesday that outside experts have blamed Russia for the leak. Obama also appeared to embrace the notion that President Vladimir Putin might have been responsible because of what he described as Trump's affinity for Putin. Trump said he has no relationship with Putin.

In Moscow on Wednesday, Putin's spokesman, Dmitry Peskov, said Russia would never interfere in another country's election.

Trump's comments were not the first time he urged hackers to release information to damage a political opponent.

He tweeted in September 2014 about one of his favourite topics-- Obama's birthplace.

"Attention all hackers: You are hacking everything else so please hack Obama's college records (destroyed?) and check 'place of birth,'" Trump wrote.

------

Associated Press writers Bradley Klapper, Ted Bridis and Chad Day in Washington, Jonathan Lemire in New York and Nataliya Vasilyeva in Moscow contributed to this report.