Mark Sanford defeated Democrat Elizabeth Colbert Busch on Tuesday to win the House seat he held for three terms in the 1990s.
As part of Wednesday’s deal, he admits he violated the agreement Feb. 3 and on other occasions.
Under the consent order signed by both parties, a family court judge will withhold sentencing as long as Sanford abides by the provisions of their 2010 divorce decree that says neither party may enter the other’s home without permission.
Sanford also agreed to pay his ex-wife $5,000 in fees and court costs.
Violation of a family court order in South Carolina carries a maximum of a year in jail, a $1,500 fine or 300 hours of public service or a combination of the three.
The settlement came the day before the Sanford was scheduled to appear in court to answer the trespassing complaint.
Sanford spokesman Joel Sawyer said the new congressman had no comment beyond what was in the settlement. The AP left a message with Jenny Sanford.
The trespassing complaint said that Jenny Sanford confronted Sanford leaving her Sullivans Island home Feb. 3 by a rear door, using his cellphone for a flashlight. Sanford has said he had tried to get in touch with her and was there so his youngest son would not have to watch the Super Bowl alone.
The complaint alleged Sanford had “entered into a pattern of entering onto plaintiff’s property.”
In February 2011, an attorney for Jenny Sanford sent Sanford a letter telling him not to trespass. A copy of that letter was also sent to the local police, according to court filings.
Mark and Jenny Sanford divorced after he left the state for five days 2009, only to return to admit he was seeing his mistress, an Argentine woman to whom he is now engaged.
News of the trespassing complaint prompted the National Republican Congressional Committee to pull its support from Sanford’s congressional campaign.
Still, Sanford won with 54 percent of the vote in the predominantly GOP district on the state’s south coast.