The woman turned out to be an undercover detective.

William Marchant, the chief financial officer of the Massachusetts Trial Court, was arrested Tuesday afternoon in Chinatown, where police said he had agreed to meet a woman he solicited for sex.

A high-ranking official in the state’s court system was among nine men swept up in an online prostitution sting Tuesday in Boston.

Marchant, who is 54 and runs the fiscal affairs department of the Trial Court, was arraigned Wednesday in Boston Municipal Court. He was released on personal recognizance and is due back in court July 7. Marchant has been placed on unpaid administrative leave, a spokeswoman for the Trial Court said Thursday. She declined to comment further.


Marchant could not be reached for comment. His lawyer, Tracy Dudevoir, did not return a telephone message.

Marchant and eight other men were arrested as part of an undercover operation by the Boston Police Department’s human trafficking unit.

Prosecutors said each of the men responded to a decoy online advertisement posted on backpage.com, a popular classified ad site that has also been used for sexual solicitation. The site, which closed its adult advertising section in January, has been criticized by political leaders and human rights advocates for allowing ads that promote the solicitation of minors.

The men arrested Tuesday responded to ads offering sex with a woman for fees ranging between $130 and $200.

Marchant answered the ad and texted the undercover detective who told him to come to 20 Pine St., according to prosecutors. When he arrived, he was approached by police.

“Human trafficking exists because sex buyers make it profitable,” Suffolk District Attorney Daniel F. Conley said in a statement. “Part of our strategy is making clear that there are personal, social, and legal consequences for that behavior. If you come into Suffolk County to buy sex, you aren’t just participating in an industry that thrives on exploitation, you’re risking arrest and prosecution.”


Under state law, the maximum penalty for soliciting sex is 2½ years in county jail and a maximum fine of $5,000.

Marchant’s department prepares and receives budget requests throughout the Trial Court and process the financial transactions for the agency’s court divisions. Marchant earned $156,638 in fiscal 2016, according to state records.

Marchant, who lives in Norwood, is also the owner of Green Flooring Services, a carpet and upholstery cleaning company in Norwood. Marchant listed that occupation on his booking sheet, but not his job at the Trial Court.

In 2014, Marchant testified for the prosecution in the federal trial of former probation commissioner John J. O’Brien, who was accused of offering jobs to the friends and family members of state legislators in exchange for legislative favors.

On the stand, Marchant said that funding for the Probation Department rose significantly in 2009 even though the state was entering a fiscal crisis and other departments in the court system faced budget cuts.

Also arrested Tuesday was Bishop A. Livingston Foxworth, a well-known Dorchester pastor whose Pentecostal church, Grace Church of All Nations, is regularly visited by high-profile politicians and ministers.

When Governor Charlie Baker was sworn into office in the House chamber in January 2015, Foxworth delivered the benediction. The Rev. Jesse Jackson visited the church in April.

A man who answered the phone at the church Thursday declined to comment on the case. He would not identify himself.


Baker’s spokeswoman, Lizzy Guyton, said the governor is “saddened by this news and is confident the courts will examine the facts and reach an appropriate decision.”

Baker “has made combating human trafficking a priority by working across state government to enact anti-trafficking policies and proposing legislation to give law enforcement more tools to crack down on trafficking-related crimes,” she said.

Maria Cramer can be reached at mcramer@globe.com. Follow her on Twitter @globemcramer. John Ellement of the Globe staff contributed to this report.