Paul Manafort, then the Trump campaign chairman, at the Republican National Convention in Cleveland in July. Win McNamee/Getty Images

WASHINGTON — American spies collected information last summer revealing that senior Russian intelligence and political officials were discussing how to exert influence over Donald J. Trump through his advisers, according to three current and former American officials familiar with the intelligence.

The conversations focused on Paul Manafort, the Trump campaign chairman at the time, and Michael T. Flynn, a retired general who was advising Mr. Trump, the officials said. Both men had indirect ties to Russian officials, who appeared confident that each could be used to help shape Mr. Trump’s opinions on Russia.

Some Russians boasted about how well they knew Mr. Flynn. Others discussed leveraging their ties to Viktor F. Yanukovych, the deposed president of Ukraine living in exile in Russia, who at one time had worked closely with Mr. Manafort.

The intelligence was among the clues — which also included information about direct communications between Mr. Trump’s advisers and Russian officials — that American officials received last year as they began investigating Russian attempts to disrupt the election and whether any of Mr. Trump’s associates were assisting Moscow in the effort. Details of the conversations, some of which have not been previously reported, add to an increasing understanding of the alarm inside the American government last year about the Russian disruption campaign.

The information collected last summer was considered credible enough for intelligence agencies to pass to the F.B.I., which during that period opened a counterintelligence investigation that is continuing. It is unclear, however, whether Russian officials actually tried to directly influence Mr. Manafort and Mr. Flynn. Both have denied any collusion with the Russian government on the campaign to disrupt the election.

John O. Brennan, the former director of the C.I.A., testified Tuesday about a tense period last year when he came to believe that President Vladimir V. Putin of Russia was trying to steer the outcome of the election. He said he saw intelligence suggesting that Russia wanted to use Trump campaign officials, wittingly or not, to help in that effort. He spoke vaguely about contacts between Trump associates and Russian officials, without giving names, saying they “raised questions in my mind about whether Russia was able to gain the cooperation of those individuals.”

Whether the Russians worked directly with any Trump advisers is one of the central questions that federal investigators, now led by Robert S. Mueller III, the newly appointed special counsel, are seeking to answer. President Trump, for his part, has dismissed talk of Russian interference in the election as “fake news,” insisting there was no contact between his campaign and Russian officials.

The White House, F.B.I. and C.I.A. declined to comment, as did spokesmen for Mr. Manafort. Mr. Flynn’s lawyer did not respond to an email seeking comment.

The current and former officials agreed to discuss the intelligence only on the condition of anonymity because much of it remains highly classified, and they could be prosecuted for disclosing it.

Last week, CNN reported about intercepted phone calls during which Russian officials were bragging about ties to Mr. Flynn and discussing ways to wield influence over him.

In his congressional testimony, Mr. Brennan discussed the broad outlines of the intelligence, and his disclosures backed up the accounts of the information provided by the current and former officials.

“I was convinced in the summer that the Russians were trying to interfere in the election. And they were very aggressive,” Mr. Brennan said. Still, he said, even at the end of the Obama administration he had “unresolved questions in my mind as to whether or not the Russians had been successful in getting U.S. persons, involved in the campaign or not, to work on their behalf again either in a witting or unwitting fashion.”

Mr. Brennan’s testimony offered the fullest public account to date of how American intelligence agencies first came to fear that Mr. Trump’s campaign might be aiding Russia’s attack on the election.

By early summer, American intelligence officials already were fairly certain that it was Russian hackers who had stolen tens of thousands of emails from the Democratic Party and Hillary Clinton’s campaign. That in itself was not viewed as particularly extraordinary by the Americans — foreign spies had hacked previous campaigns, and the United States does the same in elections around the world, officials said. The view on the inside was that collecting information, even through hacking, is what spies do.

But the concerns began to grow when intelligence began trickling in about Russian officials weighing whether they should release stolen emails and other information to shape American opinion — to, in essence, weaponize the materials stolen by hackers.

An unclassified report by American intelligence agencies released in January stated that Mr. Putin “ordered an influence campaign in 2016 aimed at the U.S. presidential election.”

Before taking the helm of the Trump campaign last May, Mr. Manafort worked for more than a decade for Russian-leaning political organizations and people in Ukraine, including Mr. Yanukovych, the former president. Mr. Yanukovych was a close ally of Mr. Putin.

The Russian government views Ukraine as a buffer against the eastward expansion of NATO, and has supported separatists in their yearslong fight against the struggling democratic government in Kiev.

Mr. Flynn’s ties to Russian officials stretch back to his time at the Defense Intelligence Agency, which he led from 2012 to 2014. There, he began pressing for the United States to cultivate Russia as an ally in the fight against Islamist militants, and even spent a day in Moscow at the headquarters of the G.R.U., the Russian military intelligence service, in 2013.

He continued to insist that Russia could be an ally even after Moscow’s seizure of Crimea the following year, and Obama administration officials have said that contributed to their decision to push him out of the D.I.A.

But in private life, Mr. Flynn cultivated even closer ties to Russia. In 2015, he earned more than $65,000 from companies linked to Russia, including a cargo airline implicated in a bribery scheme involving Russian officials at the United Nations, and an American branch of a cybersecurity firm believed to have ties to Russia’s intelligence services.

The biggest payment, though, came from RT, the Kremlin-financed news network. It paid Mr. Flynn $45,000 to give a speech in Moscow, where he also attended the network’s lavish anniversary dinner. There, he was photographed sitting next to Mr. Putin.

A senior lawmaker said on Monday that Mr. Flynn misled Pentagon investigators about how he was paid for the Moscow trip. He also failed to disclose the source of that income on a security form he was required to complete before joining the White House, according to congressional investigators.

American intelligence agencies routinely tap the phones of Russian diplomats, and transcripts of the calls showed that Mr. Flynn urged the Russians not to respond, saying relations would improve once Mr. Trump was in office, officials have said.

But after misleading Vice President Mike Pence about the nature of the calls, Mr. Flynn was fired as Mr. Trump’s national security adviser after a tumultuous 25 days in office.