The Episcopal bishop accused of killing a bicyclist while drunk and texting last month was released Thursday from a Baltimore jail after posting $2.5 million bail — an amount her attorney said earlier this week she would not be able to meet.

Bishop Heather Elizabeth Cook was headed to an inpatient-treatment facility, and a condition of her release from Baltimore’s Central Booking and Intake Center was that she not be permitted to drive, said David Irwin, one of her attorneys.

A bondsman put up her bail after receiving a $35,000 check from Mark H. Hansen, a former pastor in Connecticut who was removed from the priesthood after a flap over his opposition to the ordination of gay bishops.

Hansen, of Millington, Md., is executive director of the St. Paul’s Cathedral Trust in America, a nonprofit group that supports the famed London cathedral. He is identified on his LinkedIn profile as a “lay pastor” at St. Clement’s, an Episcopal church on Maryland’s Eastern Shore, where Cook was part of the diocese for 10 years.

Sharon Tillman, a spokeswoman for the Episcopal Diocese of Maryland, said Hansen was a “friend” of Cook’s. She said the church was not involved in the posting of bail but was “grateful that [Cook will] now be able to resume treatment.”

Hansen signed a promissory note agreeing to pay $215,000, in $1,000 monthly installments, records show. If Cook fails to appear in court, Hansen could be on the hook for the $2.5 million.

Hansen could not be reached immediately for comment Thursday.

Cook was charged last week with manslaughter and other charges related to the Dec. 27 crash that killed Thomas Palermo. Authorities said Cook left the scene of the crash and then returned about 30 minutes later. A breath test showed a blood-alcohol level of 0.22, police said. That’s nearly three times the legal limit in Maryland.

At Cook’s bail review Monday, Assistant State’s Attorney Kurt Bjorklund asked District Court Judge Nicole Pastore Klein to revoke bail, and one of Cook’s attorneys, Jose A. Molina, asked that it be lowered to $500,000.

Molina said she was not a flight risk and would enroll in alcohol treatment if released. She had been at the Father Martin’s Ashley facility in Havre de Grace before her arrest.

Klein denied the request, saying Cook showed a “reckless and careless indifference to life.”

A hearing in the case is scheduled for Feb. 6, although the next step in the process is typically a criminal indictment in Circuit Court.

The Episcopal diocese is investigating the election of Cook as the first female bishop in the Maryland Diocese last year. On her record, Cook had a drunken-driving arrest from 2010 in which she registered a 0.27 blood-alcohol level. Her arrest was known to those who vetted the candidates, the church has said, but not to those who voted.

Hansen has his own controversial history with the church. He became known as one of the “Connecticut Six” in 2003 for opposing the Connecticut bishop’s support for the ordination of gay bishops. The case attracted national attention.

Hansen and five other priests stopped forwarding dues to the diocese and requested supervision from a different bishop, according to the New York Times.

In 2005, Hansen was suspended from his duties as rector of a Bristol, Conn., church after being accused of taking an unauthorized sabbatical. Hansen was barred from leading any parish in the state for six months and was eventually defrocked, according to the Hartford Courant.

Parishioners filed a federal lawsuit against the leader of the Episcopal Church of Connecticut, claiming that Hansen acted illegally when the diocese seized control of his church. The lawsuit was thrown out.

Cook and Hansen attended the General Theological Seminary in the 1980s, according to the school’s web site. Hansen participated in Cook’s consecration ceremony in September as one of the presenters of gifts.

— Baltimore Sun