NEW YORK — President Trump’s former longtime attorney and his onetime campaign chairman were separately declared guilty Tuesday of eight crimes each, a dramatic collision of two investigations that intensified the legal and political pressure on the embattled president.

In a guilty plea entered in a Manhattan federal courthouse, former Trump lawyer Michael Cohen implicated Trump directly in some of his acts, saying he arranged to pay off two women to keep their stories of alleged affairs with Trump from becoming public before Election Day — in coordination with the then-candidate.

At nearly the same moment, a jury in Alexandria, Va., convicted former Trump campaign boss Paul Manafort on eight of the 18 tax- and bank-fraud charges against him and said it was deadlocked on the 10 others.

The charges in the Manafort trial involved the former campaign manager’s personal finances and were not related to special counsel Robert S. Mueller III’s investigation of Russian interference in the 2016 campaign. But Manafort’s conviction on eight counts, in the first trial to emerge from Mueller’s inquiry, was a major victory for the special counsel.

“Paul Manafort’s a good man,” Trump told reporters in West Virginia. The verdict, he said, “doesn’t involve me, but I still feel, you know, it’s a very sad thing that happened.”

Later, speaking to supporters at a rally in Charleston, W.Va., the president repeated his frequent denunciation of the special-counsel investigation as the “Russia witch hunt.”

“Where is the collusion?” he said, his voice rising. “Where is the collusion?”

Tuesday’s dual courtroom dramas played out on cable TV in an extraordinary split screen. Five Trump associates have now pleaded guilty or been charged with criminal wrongdoing since Trump took office, including his former national security adviser, his deputy campaign chairman and a former campaign policy adviser.

In a statement, Trump attorney Rudolph W. Giuliani said: “There is no allegation of any wrongdoing against the president in the government’s charges against Mr. Cohen. It is clear that, as the prosecutor noted, Mr. Cohen’s actions reflect a pattern of lies and dishonesty over a significant period of time.”

Cohen — long the self-professed “fixer” for Trump — pleaded guilty after prosecutors warned that he risked more than a dozen years in prison, according to a person familiar with the matter. Although Cohen’s plea deal did not include a promise to cooperate with investigators against any other people, his description of his acts implicated not just himself but also Trump and others.

Lanny Davis, an attorney for Cohen, said in television interviews Tuesday night that Cohen has information that would be of interest to Mueller and is happy to share it with the special counsel.

Davis told MSNBC that those topics include the “computer crime of hacking” and “whether or not Mr. Trump knew ahead of time about that crime and even cheered it on.”

Mueller “will have a great deal of interest in what Michael has to say,” he added.

Earlier Tuesday, Cohen pleaded guilty to five counts of tax evasion, one count of making a false statement to a bank and two campaign finance violations: willfully causing an illegal corporate contribution and making an excessive campaign contribution.

“Guilty, your honor,” Cohen said eight times as Judge William H. Pauley III read the counts.

The longtime attorney for Trump faces a recommended prison sentence of 46 to 63 months, according to court filings.

Cohen told the court that “in coordination with and at the direction of a candidate for federal office,” he and the chief executive of a media company worked in the summer of 2016 to keep an individual from publicly disclosing information that could harm the candidate. And he said he worked “in coordination” with the same candidate to make a payment to a second individual.

“I participated in this conduct . . . for the principal purpose of influencing the election,” he said.

The details he described matched payments made to former Playboy model Karen McDougal and adult-film star Stormy Daniels. Both have alleged that they had sexual encounters with Trump, which he has denied.

In August 2016, McDougal was paid $150,000 by AMI, the parent company of the National Enquirer, for the rights to her story, which the company then shelved. In October 2016, Cohen used a home-equity line of credit to finance a $130,000 payment to Daniels.

Trump had previously denied knowledge of the Daniels payoff, and Giuliani said Trump did not know about it at the time. But Cohen said Tuesday that Trump repaid him the money for the purpose of influencing the campaign.

According to court filings, Cohen used a line of credit for the Daniels payment that he obtained through a fraudulent loan application in 2015.

In January 2017, after Trump’s election, he sought reimbursement for the Daniels payment from Trump. Unnamed executives at the Trump Organization directed that Cohen be paid $420,000, which would reimburse him for his payment, along with additional money for taxes and expenses and a $60,000 bonus, filings said. One executive told another to falsely describe the fees as legal expenses and describe the first two monthly payments as a “retainer,” according to court papers.

Court papers also detailed extensive behind-the-scenes efforts by a person matching the description of AMI Chairman David Pecker to try to stop negative stories about Trump from surfacing.

Pecker and a top National Enquirer official warned Cohen through an encrypted application that Daniels was going to make a deal to sell her story to another outlet, court papers said. Within days, Cohen had used a shell company to wire Daniels’s attorney $130,000.

AMI officials did not respond to requests for comment.

Asked by Pauley, the judge, whether he knew what he did was wrong and illegal, Cohen said yes.

Davis said in a statement that Cohen pleaded guilty “so that his family can move on to the next chapter.” “Today he stood up and testified under oath that Donald Trump directed him to commit a crime by making payments to two women for the principal purpose of influencing an election,” Davis added. “If those payments were a crime for Michael Cohen, then why wouldn’t they be a crime for Donald Trump?”

A spokeswoman for the U.S. attorney’s office for the Southern District of New York declined to comment.

According to court filings, Cohen failed to report $4 million in income from 2012 to 2016 to avoid paying taxes on money he earned, mostly through interest and taxi rental payments.

He also concealed $100,000 he made selling a piece of property in Ocala, Fla., in 2014, a $30,000 in profit he made for arranging the sale of a couture Birkin handbag and $200,000 in consulting fees he made from an assisted-living company, according to filings.

As part of his plea deal, Cohen agreed to file corrected tax returns and pay $1.5 million to the Internal Revenue Service.

Cohen — who is out on bail until his scheduled sentencing in December — left the courthouse shortly after the hearing ended, entering a black Buick as a protester across the street screamed, “Lock him up.”

Robert Khuzami, the deputy U.S. attorney for the Southern District of New York, said in a statement that rather than respect the law as an attorney, Cohen “chose to break the law, repeatedly over many years and in a variety of ways. His day of reckoning serves as a reminder that we are a nation of laws, with one set of rules that applies equally to everyone.”

The case against him stems in part from work done by Mueller’s team, which examined Cohen’s role in at least two episodes involving Russian interests, according to people familiar with that probe.

However, special-counsel investigators have indicated to federal law enforcement officials that the office does not require Cohen’s cooperation for its inquiry, according to two people familiar with their work.

The Cohen investigation first burst into public view in April, when FBI agents searched his New York office, home and hotel room. The searches — in which agents collected all of Cohen’s phones and electronic devices — set off panic in the White House that federal investigators were looking into Trump’s business dealings and communications with Cohen.

Since then, the probe has led to revelations about how Cohen sought to squelch negative stories about Trump and then leverage his access to the president.

After the raid, Giuliani acknowledged that the president had made several payments reimbursing Cohen for the $130,000 settlement with Daniels.

Meanwhile, leaked documents showed that Cohen was paid millions last year by companies such as AT&T and Novartis to provide advice about the administration.

Cohen had been under scrutiny by federal prosecutors starting in the fall of 2017, when Mueller’s team came across some unusual financial transactions and loans Cohen had obtained. The special counsel referred the matter to the U.S. attorney’s office for the Southern District of New York.