LOWELL -- Before Darryl Valcourt allegedly robbed the TD Bank in Dracut last Tuesday afternoon, he walked up to the bank and opened the door for a customer allowing him to enter the bank first, police said.

"After you, sir,'' Valcourt politely told the customer.

Prosecutor Christine Maltby alleges that Valcourt, 37, of Lowell, then cut in front of people in line at the bank at 1255 Bridge St. and placed a green note in front of the teller demanding cash and saying he was armed.

The robber wore a baseball cap, sunglasses and a gray hooded sweatshirt. No weapon was shown.

In Lowell District Court on Monday, Valcourt, of 60 Leeds St., pleaded not guilty to one count of armed robbery.

Maltby asked for $25,000 cash bail, but defense attorney Glen Randall emphasized that Valcourt turned himself in and Dracut police released him to appear in court, which he did.

Judge Thomas Brennan set bail at $2,500 and ordered Valcourt to stay away from the bank and any witnesses. A probable-cause hearing is scheduled for Feb. 4.

The same patron who had the door held for him later provided police with Valcourt's direction of travel as the robber fled on foot.

Valcourt was fleeing when the red dye pack in the bag exploded, covering his outer clothes. He discarded the dye pack, a wad of cash, the note and his stained clothing, all of which were recovered by police.

After learning police were looking for him, Valcourt turned himself in to Dracut police Thursday, Maltby said. Valcourt allegedly confessed to police he robbed the bank, explaining he is a heroin user, but wanted to do the "right thing,'' she said.

Follow Lisa Redmond on Tout and Twitter@lredmond13_lisa.