Calling the initial amount set by a magisterial judge as “woefully inadequate,” a Bucks County judge on Tuesday increased the bail for a former Warminster police officer accused of sexually assaulting four teenage boys he met in the 1980s and 1990s through a drug-education program.

James Carey, 52, had been arraigned April 7 on more than 100 counts of statutory sexual assault, involuntary deviate sexual intercourse, corruption of minors, and related offenses. But he was released from custody after posting 10% of his $100,000 bail.

Prosecutors filed a petition the next day to have Carey’s bail increased, calling him a “danger to the community.”

On Tuesday, President Judge Wallace Bateman seemingly agreed. After a hearing in Doylestown, he set Carey’s bail at $250,000 cash and when the ex-officer couldn’t pay, the judge sent him to the county prison to await trial.

Carey met the youths between 1988 and 2000 through the D.A.R.E. program at schools in the Centennial School District, investigators said. He would befriend the boys — all of whom had issues at home — and invite them to his house or to take trips with him to a Boy Scout camp in Pipersville.

The four alleged victims told a Bucks County grand jury that Carey acted as a father figure, making excuses to spend time with them alone, and then groped them or forced them into sexual encounters.

First Assistant District Attorney Jennifer Schorn, the lead prosecutor on the case, told the judge Tuesday that Carey’s recent behavior demonstrated his lack of accountability to law enforcement.

She disclosed that when Carey applied for a job as a bus driver at a school district in South Jersey, where he currently lives, he failed to report that he was formerly employed for more than 20 years as a police officer in Warminster. Nor did he say that he had been the subject of an internal investigation into allegations of sexual misconduct in 2001, the prosecutor told the judge.

“Carey made sure to design circumstances to be around children, using his authority,” Schorn said. “He still has that ability to ingratiate himself in victims’ lives.”

» READ MORE: ‘A wolf in sheep’s clothing’: For years, a Warminster police officer sexually assaulted troubled teens, DA says

Carey’s defense attorney, Thomas Joachim, said in court that the former officer vehemently denies the allegations, and poses no risk to the community. Joachim noted that the alleged assaults took place up until 2001 and that there have been no complaints against him in Bucks County since then.

“There’s rumors, innuendos, and suspicions, but not one fact leading to a charge for an assault in the last 20 years,” Joachim said.

Carey was a fixture in Warminster until 2005, when he was fired from the police department for mishandling unrelated cases, prosecutors said. He won his job back through arbitration, and retired in 2009. He moved to Cape May County, where New Jersey State Police investigated him for similar complaints about inappropriate behavior with children, according to filings in Bucks County. No charges were filed.

The investigation into Carey’s behavior during his time in Warminster gained momentum last May, prosecutors said, when an adult came forward to report that when he was a teenager he had been molested by Carey at a rec center in the township, according to the affidavit of probable cause for Carey’s arrest.