COLUMBIA -- State Rep. Thad Viers was charged Friday with harassing his former girlfriend after she told investigators that he continued to call, text and email her for more than five months after they broke up, according to a Myrtle Beach police report.

Viers' arrest came nearly four years after he pleaded no contest to threatening to beat and sexually assault a man dating his estranged wife.

The Myrtle Beach Republican announced in a news release about an hour after his arrest that he was ending his bid for a congressional seat and wouldn't seek re-election to his state House seat this year.

The former girlfriend said she repeatedly asked him to stop contacting her after she broke off their relationship in June or July, but she was reluctant to press charges because she didn't want to hurt Viers' political career, police said.

The woman wrote several letters to Viers asking him to stop, including one sent by her attorney. The woman's father also sent his own letter after Viers sent him tickets to a sporting event, investigators said.

The woman finally went to police with a three-ring binder containing details of the calls, emails and texts, and on Dec. 16 a detective asked Viers to stop calling the woman, according to a police report.

The woman told police that Viers contacted her twice more, once by email on Dec. 22 and again through a New Year's Eve text sent from someone else's cellphone, police said.

A judge released Viers on a personal recognizance bond Friday, but warned him that he would stay in jail with no bond if he contacted the woman again.

After the hearing, Viers said he and the woman had dated for four years. He said he asked her to marry him on Dec. 16, and she said no, according to The Sun News of Myrtle Beach.

Viers has served five terms in the South Carolina House and was running for Congress in the newly created 7th District. A news release from his campaign sent after his Friday arrest said he was dropping out of the race "due to personal reasons," and wouldn't run for his state House seat again.

At a Charleston gathering sponsored by the conservative blog RedState last August, Gov. Nikki Haley recognized Viers in the crowd and noted his run for Congress. She said he was "a good conservative, a strong fighter, somebody you should definitely pay attention to.

"We've got one of the best federal delegations in the country. Thad would make a great addition to that."