A former Maryland mayor and well known LGBTQ activist, convicted earlier this year in a heinous child pornography case, was sentenced to 30 years in prison on Monday. 

Patrick Wojahn, who resigned as mayor of College Park, Maryland, on March 2 before his arrest, pleaded guilty to 140 charges related to child pornography as part of a deal struck with prosecutors. He was sentenced to 150 years total, with all but 30 years suspended, but still will be eligible for parole in 7.5 years under state law, The Washington Post reported. The conviction came after investigators linked an account sharing illicit images to his government email address.

"I do sense the remorsefulness," Prince George's County Circuit Court Judge Karen Mason said of Wojahn on Monday during an emotional hearing when prosecutors read hours of victim impact statements. "And I do know you take responsibility."

Authorities say the 48-year-old uploaded and shared dozens of photos and videos depicting explicit child sex abuse, including the rape of prepubescent boys by adults, to social media apps in January, The Post reported. The National Center for Missing and Exploited Children notified Prince George’s County Police Department of the social media activity in mid-February.

MONTANA MAN PLEADS NOT GUILTY TO CHILD SEXUAL ABUSE CHARGES LINKED TO MISSING ARIZONA TEEN

Patrick Wojahn

Patrick Wojahn was arrested in March on dozens of child porn charges. (Prince George’s County Police Department)

Through their investigation, police determined a social media account with the screen name "skippy_md" belonged to Wojahn, FOX 5 DC reported. 

By means of a subpoena, investigators found that Wojahn's College Park government email address was listed as the recovery email for the Kik account. Wojahn's phone number and home IP address were linked to the account, according to authorities, who say the ex-mayor used a virtual private network to mask his location when accessing the account. 

More explicit images were also found on the social media app Telegram.

Patrick Wojahn addresses gay marriage lawsuit

Plaintiffs Dave Kolesar, left, and Patrick Wojahn speaking after the American Civil Liberties Union of Maryland and Equality Maryland press conference to denounce the Maryland Court of Appeals decision to uphold a state law that bars marriage protection for same-sex couples in Baltimore on Sept. 18, 2007. (Mark Gail/The The Washington Post via Getty Images)

OKLAHOMA HUMAN TRAFFICKING SUSPECT ARRESTED, ALLEGEDLY USED FAKE ID TO AVOID DEPORTATION FOR 2 DECADES

Court records show Wojahn was indicted in March by a grand jury on 80 counts of possessing and intent to distribute child pornography, which were amplified to 140 counts in May through a superseding indictment. He pleaded guilty in August to all 60 counts of distribution of child pornography, 40 of possession of child pornography and 40 of possessing child pornography with the intent to distribute. Of those kids depicted in the hundreds of photos and videos Wojahn possessed and shared, law enforcement identified 52 child victims, some of whom are now adults, in collaboration with the Justice Department’s Internet Crimes Against Children Task Force Program and the National Center for Missing and Exploited Children.

Their victim impact statements read in court detailed struggles with extreme anxiety, paranoia, poor sleep, trust issues and a sense of safety, and some said they have been stalked and forced to move their current families and children of their own after being exposed as victims of online child exploitation. 

Patrick Wojahn and his now husband back in 2006

Dave Kolesar, left, and Patrick Wojahn, of College Park, who have been together for six years, are depicted outside a Maryland Court of Appeals proceeding after their same-sex marriage case was argued on Dec. 4, 2006. (Robert A. Reeder/The The Washington Post via Getty Images)

The judge cited Wojahn's own past as a victim of sexual abuse and also heard declarations of support from 16 people in the courtroom who spoke about Wojahn’s history of public service before deciding to refer the former mayor to the Patuxent Institution, a treatment-oriented maximum-security prison in Maryland.

Wojahn himself addressed the courtroom Monday to apologize. 

CLICK HERE TO GET THE FOX NEWS APP

"I know I contributed to that, and I’m deeply, deeply sorry … I recognize the damage I have caused," he said, according to the Post. 

"I want to be the person they know me to be," he said to the community, before addressing his husband, "I love you, too, very much."

Wojahn, a staunch LGBTQ advocate and graduate of Georgetown University Law School who joined a lawsuit with his now-husband against the state of Maryland in 2006 to make marriage a right for same-sex couples in the state, had served on the College Park City Council for eight years until he was elected mayor in November 2015. He served in that role for seven years until his resignation earlier this year.