RALEIGH, N.C. — A race in North Carolina critical to control of the U.S. Senate has been thrown into turmoil over allegations of personal misconduct by Democrat Cal Cunningham, a married man who had an extramarital relationship this summer with a consultant.

Previously undisclosed text messages obtained by The Associated Press and additional interviews show that the relationship extended beyond suggestive texts, as was previously reported, to an intimate encounter as recent as July.

Republicans hold a 53-47 majority in the Senate, and the contest between Cunningham and Republican Sen. Thom Tillis has been among the most watched in the country, with polls showing a tight race and both parties investing heavily in the outcome.

Cunningham’s personal indiscretion offers a fresh test of whether voters will punish candidates for their private, consensual activity, and the answer they deliver could determine which party wields power in the Senate. The chamber has been a bulwark for Republicans under President Donald Trump, with Democrats in control of the House.

An Army Reserve lieutenant colonel with a wholesome appeal, Cunningham was widely viewed as the kind of recruit Democrats needed to make inroads in conservative-leaning Southern states like North Carolina.

Yet the text messages and interviews offer a glimpse that is at odds with the image of a devoted family man. A week ago, a conservative website, NationalFile.com, published text messages between Cunningham and Arlene Guzman Todd, a public relations strategist from California, that suggested a personal relationship.

The newly obtained texts, which are between Guzman Todd and a friend, provide a more specific timeline about their recent relationship, as well as details that describe intimate encounters — not simply a digital exchange.

The text messages were not obtained from Guzman Todd. But the AP contacted her to confirm their authenticity. In a series