A district attorney in upstate New York has admitted that he acted in pornographic movies in the 1970s, then lied when questioned about it during his second campaign.

Mark Suben, the DA in Cortland County near Syracuse since 2008, held a news conference Friday to say he had lied about his past in the days before this year's election.

"Recently materials have been circulated alleging that I was involved in the adult film industry about 40 years ago in New York. Those allegations are true," he said. "I was an actor in adult films for a short period in the early 70s. I was also an actor in other venues including off Broadway, soap operas and commercial advertisements."

He apologized for his actions and said he used "bad judgment" by acting in porn and by lying about it. He wouldn't take questions, including whether he should resign. On his way out of the news conference, several people said "You lied to me, Mark."

Suben's spokeswoman, Aimee Milks, said Suben will not resign.

"This was nearly 40 years ago. It was not illegal. Mark Suben was not yet married. He was not practicing law and he was not a law student," said Milks. "It has nothing to do with his law practice or his current position as the district attorney of Cortland County."

"I think the situation is really irrelevant to the campaign," she said. "His record as the DA for the last four years speaks for itself."

WSTM-TV in Syracuse published a story Friday that said Suben had acted under his name and the pseudonym Gus Thomas. That news story followed a posting on YouTube that compared images of Suben with Thomas.

"A few weeks ago, when asked, I denied this to members of the press," Suben said. "I regret that and I apologize for it. I was shocked and embarrassed to be confronted with this so many years later. I was embarrassed for my family and friends who have stood by me. I also denied my actions to my family, my friends and my staff."

The IMDB online database says Suben and Thomas are linked and classified as alternate names. The name Gus Thomas appears in films such as "Lecher," and "The Love Witch." Mark Suben appears in the credits for the non-pornographic 1976 movie "Angels."

His opponent in the November election, Cortland lawyer Keith Dayton, did not return a call from The Associated Press seeking comment, but told the Syracuse Post-Standard he wasn't concerned about Suben's acting history.

"I think the more important part is the lying," he told the newspaper.

Suben has been an acting city court judge, city corporation counsel and a county attorney. He is past president of the Cortland County Bar Association. He graduated from the University of Rochester, the University of Wisconsin and Fordham Law School, according to the biography on his election website. The bio says he worked seven years as an assistant district attorney in Bronx County then moved to Syracuse. He has taught criminal trial practice as an adjunct professor for 17 years at Syracuse University Law School.

More content from NBCNews.com:

Follow US news from NBCNews.com on Twitter and Facebook