A Delaware County man was sentenced to five years of probation Friday after admitting he cast an illegal ballot last fall for former President Donald Trump in his dead mother’s name..

Bruce Bartman, 70, apologized to Common Pleas Court Judge George Pagano during a hearing in Media, saying he took full responsibility for his actions.

“I was isolated last year in lockdown,” Bartman said. “I listened to too much propaganda and made a stupid mistake.”

» READ MORE: Delaware County man charged with registering dead relatives to vote in presidential election

Bartman’s attorney, Samuel Stretton, echoed that statement in court, saying his behavior was “a very misguided political mistake, and very stupid.”

Bartman, who lives in Marple Township, entered a guilty plea Friday to two counts of perjury and one count of unlawful voting. In addition to his probation, he is unable to vote in an election for four years, and is no longer eligible to serve on a jury.

Pagano, in imposing the sentence, said the case is serious and “goes to the heart of our democracy,” but he commended Bartman for acknowledging his crimes.

District Attorney Jack Stollsteimer said he felt “justice has been served” with the outcome.

“There’s not public benefit to him being incarcerated,” Stollsteimer said. “This defendant from the beginning has accepted responsibility for his actions, and he has paid the price for them.”

» READ MORE: First it was ‘fraud,’ then they just didn’t like the rules: How Pa. Republicans justified trying to overturn an election

Last fall, Bartman used the driver’s license of his dead mother, Elizabeth Bartman, to register her to vote online, and then requested and filled out an absentee ballot in her name, prosecutors said. He repeated the process for Elizabeth Weihman, his deceased mother-in-law, using her Social Security number, though he did not cast a ballot for her.

The state’s system flagged the registration for his mother as belonging to a dead person — she died several years ago — but Bartman signed and sent back a letter asserting she was still alive.

Bartman’s forgery came to light gradually, investigators said. Rumors began to circulate on social media after the election that a dead voter in Delaware County had cast a ballot, and a complaint was eventually brought to the county Board of Elections.

» READ MORE: Fact-checking false claims about Pennsylvania’s presidential election by Trump and his allies

A task force of prosecutors, detectives, and other officials dedicated to investigating claims of election fraud followed up on the referral and found evidence of the fraudulent ballot.

Bartman was one of three Pennsylvania men accused of committing voter fraud by casting illegal ballots for former President Donald Trump during the presidential election. The two others — Ralph Thurman of Chester County and Richard Lynn of Luzerne County — have criminal cases pending.