The Edgartown man accused of robbing a Falmouth bank was ordered to be held without bail this week after a judge deemed him a danger to the community.

A Falmouth District Court judge ruled Tuesday that Petar Petyoshin, the 40-year-old man who was arrested last week for robbing the Falmouth branch of Rockland Trust Bank at gunpoint in April, be held for 120 days while he awaits a trial.

The seriousness of the allegations against Mr. Petyoshin, the danger he poses to the community and the fact that items found at his home were consistent with clothing worn by the man caught on camera robbing the bank, prompted Judge Dominic Paratore to deem the suspect a danger, denying his opportunity to receive bail.

Law enforcement officials arrested Mr. Petyoshin at the Vineyard Registry of Motor Vehicles office in Edgartown on May 23 after an investigation involving state police, local police and the FBI. He was arraigned later that day and pleaded not guilty to charges of armed and masked robbery with a firearm, larceny over $1,200, carjacking and seven counts of kidnapping.

On April 8, Mr. Petyoshin allegedly demanded money from a bank teller while brandishing a gun and claiming to have a bomb.

Mr. Petyoshin, while wearing a wig, mask and sunglasses, also zip-tied bank patrons and employees before leaving in a stolen car with thousands of dollars, police said.

Mr. Petyoshin had a dangerousness hearing on Tuesday and is scheduled to next appear in court on June 28 for a probable cause hearing.