A St. Paul City Council candidate was arrested Monday for posting a topless photo of his wife on his campaign website, police say.

David Martinez allegedly posted the photo Saturday on his now-removed blog after police in the Minnesota city served him with a restraining order requested by his wife of 13 years.

It was the third incident this month for the 38-year-old, who is running for the council as an independent. Martinez was previously arrested at a public library, then banned from entering Target Field, where the Minnesota Twins play, according to local news reports.

Martinez allegedly said in the blog post that his wife “fabricated most of the testimony” in the restraining order. NBC affiliate KARE11 reported that Martinez said his account was “hacked” and his wife“has his passwords & is sabotaging him.”

Martinez, who is scheduled to appear at a hearing Friday,did not immediately respond to a request for comment.

Martinez yesterday told a reporter for Pioneer Press he plans to continue his bid for city council. Martinez said that “everything that’s happening to me is exactly what I’ve been … calling out.”

“If the political machine doesn’t like you, they will silence you.”

An attorney for Martinez could not be immediately reached for comment.

St. Paul police told The Washington Post that WordPress, the blog platform, removed the post Sunday.

In the restraining order, his wife alleged physical abuse that she said had a negative impact on their children, ages 7 and 10. Martinez was arrested Monday morning for “revenge porn,” police say, though he has not been charged.

The St. Paul police said the investigation is ongoing, and the city prosecutor’s office told The Post that it is reviewing the case.

Martinez has been denounced by many Minnesota politicians, including Melvin Carter, St. Paul’s first black mayor. After the alleged revenge-porn post, Carter requested that Martinez withdraw from the Aug. 14 election.

“David Martinez’s behavior is disturbing and has no place in our city,” Carter said in a statement. “I wish the best to his family and our entire community as we heal from the harm his acts have caused.”

On July 5, Martinez was arrested and later issued a citation for screaming expletives at the staff at George Latimer Central Library, according to a police report. In a blog post, Martinez said he was defending a black teenager who was wrongfully removed by white librarians, and added that he had been banned from the library for a month, according to a report by the St. Paul Pioneer Press. Library officials could not be reached for comment.

The next day, Martinez clashed with stadium officials during a Minnesota Twins game after hopping over the railing between concessions and a bar, according to the Pioneer Press. The paper said Martinez engaged in a verbal back-and-forth with security personnel, later threatened physical violence and was banned from entering for one year.

Martinez, who announced his candidacy in June, has run into controversy before.

Martinez posted a selfie with Ilhan Omar, a Somali American state lawmaker who is running for Congress. But Akhilesh Menawat, Omar’s spokesman, said in an email that the photo was taken “during a routine visit by Mr. Martinez to the State Capitol and is in no way a statement of support by Rep. Omar.” Omar has publicly endorsed Martinez’s opponent and asked Martinez to remove the photo.

Clarification: An earlier version of this post said Martinez was a first-generation immigrant. Martinez has in a bio described himself as such, and has also asserted his mother relocated to Minnesota from Puerto Rico, a territory of the United States.

Erin B. LoganErin B. Logan covers breaking and national news for The Washington Post. She has previously interned for the nonprofit Investigative Reporting Workshop at American University, National Public Radio, Blavity and Nashville Public Radio. Follow