Willingboro Township's beleaguered mayor resigned Friday, just one week after winning a contested primary race for reelection to another term.

Chris Walker, a Democrat, won the primary on June 6 and likely would have won four more years on the council in the November elections because no Republicans entered the race.

But Walker resigned under the terms of a legal settlement that he reached Monday, one day before he was scheduled to go to trial to try to prove he lives in the town of 33,000 and is therefore allowed to be its mayor.

The lawsuit was filed by Dennis Reiter, the former chairman of the town's Municipal Utilities Authority, and alleged that Walker had moved out, leaving his house in foreclosure.

Walker also agreed, as part of the settlement, to resign from the MUA, where he has served as a commissioner since 2011.  That position paid about $10,000 a year and the mayor's post paid an annual salary of about $16,000.

In an interview Friday, Walker, 48, insisted he lives in Willingboro — at a different address and with a longtime family friend — and that the only reason he is resigning is because he has health problems. "On Sunday I had to seek medical attention because of my high blood pressure, and after going to the doctor, and speaking with my family, I had to consider what was best.… Do I continue to put myself through this strain and stress or step down?" he said.

Walker is also facing a defamation lawsuit filed last year by Township Councilman Nathaniel Anderson, who was his running mate in the June 6 primary. Despite their animosity, the two were endorsed by the town's Democratic Committee after each decided to seek another four-year term on the five-member council.

The council chooses the mayor, and in January, Walker was voted in as mayor for one year. Last year, Anderson had been appointed the mayor.

The Democratic Committee's bylaws require the group to support incumbents and give them the preferred line at the top of the ballot.

Anderson and Walker handily beat challengers Harold Walker Jr. and Arrington Crawford. In the end, the incumbents each received more than 2,000 votes, while the two challengers each got nearly 900 votes.

The Democratic Committee will need to select a replacement for Walker to complete his current term, which ends Dec. 30. The challengers say they would like to be considered. Then, it would be up to the town council to appoint a new mayor from its ranks.

Michael McKenna, a Cherry Hill lawyer who represented Reiter in the lawsuit, said that the suit's only purpose was to have Walker removed from office because Walker is no longer a resident. "We kept the settlement bare bones," he said. The one-page document signed by both sides simply states Walker would leave both positions on Friday.

McKenna said that Walker had abandoned his Willingboro home a year ago and it went into foreclosure. But even after the lights were shut off, Walker  claimed on his financial disclosure forms that the house was his current address. McKenna said that he had evidence Walker is no longer a resident.

Walker's lawyer, Mark Catanzaro, was unavailable for comment on Friday.

Walker, who works for a program that helps at-risk youths, said that he was proud of his achievements on the council and these offset the discord. Among them, he said, was securing more than $8 million for a new firehouse, renaming Salem Road after the Rev. Dr. Martin Luther King Jr., and restoring youth sports in the town.

"I love Willingboro and I loved working hard for Willingboro, but a lot of stress comes with being in public office and now it's time to move on with another chapter in my life," he said.