Rep. Joe Barton of Texas apologized to his constituents Wednesday for a nude photo of himself that began circulating the internet earlier this week.

In a statement published by The Texas Tribune, the Republican congressman acknowledged the authenticity of the photo and apologized to his constituents.

"While separated from my second wife, prior to the divorce, I had sexual relationships with other mature adult women. Each was consensual. Those relationships have ended. I am sorry I did not use better judgment during those days. I am sorry that I let my constituents down."

Barton, the longest-serving congressman from Texas, is just the latest government official embroiled in a sexual scandal, but he made sure to clarify that he was involved in consensual relationships with "mature adult women" at the time the photo was taken.

The photo, which was posted to an anonymous Twitter account, emerged online after the congressman announced his bid for re-election to the House earlier this month, according to The Texas Tribune. It's unclear how the nude photo got online or who posted it.

Barton told The Texas Tribune in an interview Tuesday that he was deliberating about his political future. But a spokesperson for Barton, who has represented Texas' 6th Congressional District since 1985, said on Wednesday that he had no plans to resign and had filed for re-election, according to the Tribune.

Barton's office did not immediately respond to CNBC's request for comment.