STAMFORD — A Westport man allegedly ignored a protective order and tried to gain entry to the Stamford apartment where his ex-girlfriend and daughter live, police said.

Michael Ward, 49, of Riverside Avenue, was charged Friday with criminal violation of a restraining order and released on a $10,000 court-appearance bond. When he returned to court Monday for his arraignment on the domestic charge, however, a Stamford judge upped his bond to $500,000 and he was taken into custody again.

Ward has another court date set for Tuesday, when he will be arraigned on new charges, police said.

Assistant State’s Attorney Dan Cummings said Ward had described his ex-girlfriend, with whom he is in the midst of a drawn out and acrimonious custody battle, as being “dead as dirt.” Cummings said in court that Ward told the woman about weaknesses in her apartment building’s security in a way that indicated that he had been to the building and appeared to mean those comments in an intimidating way.

Cummings also said Ward, in court filings, has described his daughter as having been kidnapped and that he intended to rescue her.

Judge Bruce Hudock said he found those allegations very troubling and decided to raise Ward’s bond accordingly.

Ward was arrested Nov. 24 after Ward’s ex-girlfriend told police he had shown up at her downtown apartment, which he was not allowed to do. She told police Ward had written something about her in the elevator of her apartment building, according to his two-page arrest warrant.

The woman said she missed three calls left by someone who did not want their identification known at 2:27 a.m., 3:16 a.m. and 3:50 a.m. Later that same day, the woman said she noticed that her name had been written in black sharpie on the left side of the elevator buttons, according to the warrant. The woman said she recognized the writing as Ward’s which she compared to a handwritten document he had filed at the Stamford courthouse.

When the woman looked at footage from her video doorbell, she saw Ward had come to her door on the same morning at 2:04 and 2:13 a.m., the affidavit said.

The woman said Ward put his hands in his sleeves and covered the peep hole in the door with one hand and with the other he tried to gain entry to the apartment, the affidavit said.

Because the camera is motion activated it caught Ward in the act, the affidavit said.

The woman showed police a copy of a judge’s Order of Protection against Ward, prohibiting him from being within 100 yards of the complainant, the affidavit said.

Because a key fob is required to get into the apartment building, police said they do now know how Ward got in.