Kenneth Miller, right, walks with his wife to federal court Thursday in Burlington. Miller, who was convicted of helping a woman and her daughter flee the country rather than share custody of the girl, refused to testify before a grand jury.

BURLINGTON — A Virginia pastor convicted of aiding the flight of a woman and her daughter during a custody dispute with the woman’s former lesbian partner was taken into federal custody Thursday after refusing to answer questions from a grand jury investigating the custody case.

Before surrendering his belt and wallet and being handcuffed by court officers, Kenneth Miller, of Stuarts Draft, Va., apologized to U.S. District Court Judge William Sessions for burdening the court, but he said his religious beliefs prevented him from complying with the court’s order that he testify about others involved in the 2009 flight of Lisa Miller and her daughter. The Millers are not related.

“I am willing to submit myself to whatever” the court decides, the 47-year-old Miller said Thursday during a hearing called after he refused to answer questions from the grand jury sitting at the federal courthouse in Burlington.

Sessions was reluctant to order him held and gave him several chances to change his mind.

“We can’t function as a criminal justice system without the grand jury,” Sessions said. “I appreciate your faithfulness to your religion and your moral beliefs, and perhaps there is an inherent conflict here.”

One of Kenneth Miller’s lawyers said he didn’t believe incarcerating Miller would induce him to testify, but Sessions said there was no way to find out unless Miller spent time in jail. Sessions scheduled another hearing in a week.

After Kenneth Miller was taken into custody, his wife, Linda, in court along with a handful of other supporters, said she wasn’t surprised by the court’s action.

“He will always be my husband,” she said. “Until death do us part.”

Kenneth Miller was convicted last summer by a jury of helping Lisa Miller and her daughter, Isabella, travel from Virginia to Nicaragua via Canada in September 2009 so Lisa Miller would not have to comply with court orders that she allow her former partner, Janet Jenkins, of Fair Haven, to visit with the girl.

Two months after they disappeared, a Vermont family court judge transferred custody of the girl to Jenkins.

Lisa Miller and Isabella are believed to be in Nicaragua.

Jenkins and Lisa Miller were joined in a Vermont civil union in 2000, and Isabella was born to Lisa Miller in 2002. The couple split in 2003. The Vermont family court gave custody to Lisa Miller but gave Jenkins regular visits.

Lisa Miller then returned to Virginia, became a conservative Christian, renounced homosexuality and sought full custody. The legal case played out for years, until they disappeared.

Kenneth Miller is facing up to three years in prison on his conviction. Sentencing is scheduled for March 4.

Kenneth Miller had fought efforts to compel him to testify, but this month the 2nd U.S. Circuit Court of Appeals in New York rejected arguments that he was being forced to testify against himself because he had been granted immunity from prosecution for anything he told the grand jury.

Before Sessions ordered that he be held, the two engaged in an unusual philosophical debate between the bench and the defense table. Miller said he couldn’t testify because it would implicate others who helped Lisa Miller and her daughter flee who were also motivated by God’s law, which they feel trumps civil law. Sessions countered that his job is to uphold the sanctity of the legal system and that it is a citizen’s duty to comply with orders to testify about their knowledge of crimes.

One of Kenneth Miller’s attorneys, David Bercot, an Anabaptist lawyer from Amberson, Pa., said after the hearing that Miller answered some of the questions from the grand jury, but he wouldn’t talk about others involved in getting Lisa Miller and Isabella out of the country because of their shared beliefs.

“These people they wanted him to testify against are fellow citizens of God’s kingdom,” Bercot said. “And it’s like, you wanted me to be a rat, you know, to turn on my fellow citizens. That’s basically what it came down to.”

Bercot said Kenneth Miller made the decision years ago to suffer the legal consequences to keep Lisa Miller and Isabella apart from Jenkins.

“He is acting on what Lisa Miller told him are the facts of the case,” Bercot said. “It’s all based on that. It’s not just, ‘Oh, someone’s a homosexual. We are going to take their child from them.’ That is not what we would believe.”