Republican U.S. Rep. Joe Barton, Texas' most-senior member of Congress, announced Thursday that he won't seek reelection after a naked photo of him circulated online and a conservative activist released past messages of a sexual nature from him.

The photo of the 68-year-old Barton was posted on an anonymous Twitter account just before Thanksgiving, and Barton apologized. But he also suggested he could be the victim of online exploitation by a woman he'd had a relationship with whose name has not been released.

About a week later, tea party organizer Kelly Canon revealed Facebook Messenger exchanges from 2012 in which Barton asked if she was wearing panties and made other sexual references. Now twice-divorced, Barton was still married to his second wife at the time of their online exchanges.

Canon said her relationship with Barton never advanced beyond the messages. She said Barton hadn't apologized for them and that she hadn't asked him to — but she also called on him to resign so that his private life couldn't be used against him and other Republicans during 2018 congressional elections.

In announcing that he would retire next year, Barton made no mention of the embarrassing revelations.

"I am very proud of my public record and the many accomplishments of my office," he said in a statement. "Now is time to step aside and let there be a new voice."

Canon said she was happy that Barton had "finally came to his senses."

"I am very relieved that we do not have to fight that battle," the tea party activist said by phone after Barton's announcement. "It would have been a feeding frenzy, and it would have affected so many other races."

Though his seat remains safely Republican, Barton this week had drawn a little-known challenger for Texas' March primary and could have faced others. Immediately after his retirement announcement, Texas Republicans began lining up to replace him.

Before Barton decided to retire, political pressure on him to quit had increased. The Republican Party chairman in his North Texas home county of Tarrant called on him to step aside this week and began being joined by Republican members of the Texas state Senate.

A former oil and gas consultant, Barton was first elected to Congress in 1984. His retirement now means a whopping seven of the state's 36 members of Congress aren't seeking reelection. All but two of those open seats are Republican.

Barton, who is from Ennis, just south of Dallas, is vice chairman of the House Committee on Energy and Commerce and manages the Republican team that was practicing for a charity congressional baseball game in June when a gunmen opened fire, seriously wounding one congressman.

He's a member of the Freedom Caucus, a group known for sometimes clashing with Republican leadership on conservative issues.

Barton was the only Texas congressional Republican to say he would support a proposed immigration package that would provide protections for immigrants who were brought to the U.S. illegally as children. If approved, that could be an alternative to the Obama administration's Deferred Action for Childhood Arrivals program that President Trump says he will do away with.

CAPTION

Democrat Doug Jones won Alabama’s U.S. Senate seat Tuesday. A cooking fire at a homeless encampment caused the Skirball fire, officials said. San Francisco Mayor Ed Lee, 65, died Tuesday. House Democrats called for an investigation into allegations of sexual misconduct by President Trump.

Democrat Doug Jones won Alabama’s U.S. Senate seat Tuesday. A cooking fire at a homeless encampment caused the Skirball fire, officials said. San Francisco Mayor Ed Lee, 65, died Tuesday. House Democrats called for an investigation into allegations of sexual misconduct by President Trump.

CAPTION

Democrat Doug Jones won Alabama’s U.S. Senate seat Tuesday. A cooking fire at a homeless encampment caused the Skirball fire, officials said. San Francisco Mayor Ed Lee, 65, died Tuesday. House Democrats called for an investigation into allegations of sexual misconduct by President Trump.

Democrat Doug Jones won Alabama’s U.S. Senate seat Tuesday. A cooking fire at a homeless encampment caused the Skirball fire, officials said. San Francisco Mayor Ed Lee, 65, died Tuesday. House Democrats called for an investigation into allegations of sexual misconduct by President Trump.

CAPTION

Democrat Doug Jones, whose uphill bid for U.S. Senate gathered strength when Republican Roy Moore was hit with charges of sexual misconduct with teenage girls, won Alabama’s special election Tuesday.

Democrat Doug Jones, whose uphill bid for U.S. Senate gathered strength when Republican Roy Moore was hit with charges of sexual misconduct with teenage girls, won Alabama’s special election Tuesday.

CAPTION

New York City's bomb attack suspect was allegedly inspired by Islamic State's call for attacks. The Thomas fire has grown to at least 230,000 acres. "The Shape of Water" and "Big Little Lies" led the Golden Globe nominations anounced Monday. Mario Batali stepped away from "The Chew" and his day-to-day business operations.

New York City's bomb attack suspect was allegedly inspired by Islamic State's call for attacks. The Thomas fire has grown to at least 230,000 acres. "The Shape of Water" and "Big Little Lies" led the Golden Globe nominations anounced Monday. Mario Batali stepped away from "The Chew" and his day-to-day business operations.

CAPTION

Santa Barbara County is under siege from the Thomas fire. From the GOP's perspective, Alabama's Senate race will yield one of two unhappy results. The Weingart Center wants to reshape skid row's skyline. If lawmakers can agree on a tax bill, will you owe more or less?

Santa Barbara County is under siege from the Thomas fire. From the GOP's perspective, Alabama's Senate race will yield one of two unhappy results. The Weingart Center wants to reshape skid row's skyline. If lawmakers can agree on a tax bill, will you owe more or less?

CAPTION

An explosive device exploded near Times Square during the morning rush hour Monday, injuring four people and snarling Manhattan transit, authorities said. Mayor Bill de Blasio described it as a terrorist act.

An explosive device exploded near Times Square during the morning rush hour Monday, injuring four people and snarling Manhattan transit, authorities said. Mayor Bill de Blasio described it as a terrorist act.