WASHINGTON — President Trump defended himself on Monday against prosecutors’ accusation that he directed illegal payments ahead of the 2016 election to two women to stay silent about alleged extramarital affairs with him, insisting that the payments were “a simple private transaction” — not election-related spending subject to campaign-finance laws.

In a pair of early-morning tweets, Mr. Trump also maintained that even if the hush-money payments did count as campaign transactions, any failure to obey federal election regulations should be considered only a civil offense, not a criminal one. And he blamed his former lawyer, Michael D. Cohen, who has admitted to helping arrange the payments. “Lawyer’s liability if he made a mistake, not me,” Mr. Trump wrote.

Mr. Trump is effectively an unindicted co-conspirator in Mr. Cohen’s campaign-finance crimes, but his legal exposure and political liability turn on several factors, including whether a president can be charged with a crime — not while he is in office, the Justice Department has concluded — and the political mood in Congress. Republican Senate leaders were nearly unanimous on Monday in dismissing any new peril facing the president.

But Mr. Trump’s plea of ignorance has flaws, said Richard L. Hasen, a professor of election law at the University of California, Irvine. While the Obama and McCain campaigns were fined for failing to swiftly report certain expenditures, he said, they had filed corrected reports about the mistakes to federal elections officials and then paid the fines, rather than trying to hide the payments for more than a year.