A woman is alone at her home on a quiet country road.

It is early morning when there is a knock on the door. A man, a stranger, is on her porch asking for help. He has run out of gas, he says. He needs to use a phone.

The woman, in an act of kindness, obliges.

The woman was Mary E. Whitaker, 61, an accomplished violinist who lived in Manhattan and spent her summers in her home in far western New York, near Lake Erie.

The man was a homeless drifter, Charles Sanford, 30, according to law enforcement officials. And he was not alone last Wednesday morning when he knocked on Ms. Whitaker’s single-story home at 8448 Titus Road, on the Westfield-Sherman town line in Chautauqua County. Hiding nearby, the authorities said, was his accomplice, Jonathan Conklin, armed with a .22-caliber rifle and a plan.

Mr. Conklin, the authorities said, wanted to rob Ms. Whitaker so he could live like a “rock star,” using whatever they stole to buy drugs and other goods.