BOSTON -- Police stepped up patrols near the Boston Marathon finish line after a masked man walked in the street with a rice cooker in his backpack only hours after the city marked the anniversary of last year's deadly bombing.

Kevin "Kayvon" Edson, 25, was sent to Bridgewater State Hospital and ordered held on $100,000 bail at an appearance in court on charges of threatening battery, possession of a hoax explosive device, threats to commit a crime, disturbing the peace, disturbing a public assembly and disorderly conduct. His next court date was scheduled for May 7.

Edson's arrest occurred hours after ceremonies to mark last year's Boston Marathon bombings, in which two pressure cooker bombs hidden in backpacks exploded, killing three people near the finish line and injuring more than 260 others.

Police expressed confidence in heightened security measures for Monday's marathon event while acknowledging the challenge of protecting an estimated 1 million spectators and 36,000 runners across 26.2 miles (42.16 kilometres) and eight Massachusetts communities.

Security plans include thousands of uniformed police, hundreds of plainclothes officers and about 100 strategically positioned video cameras that will monitor the crowds. Police also strongly discouraged spectators from bringing backpacks.

Edson was stopped late Tuesday after passers-by told an officer they saw him yelling, walking barefoot down the middle of a street, veiled in black, in pouring rain. His face was painted yellow and blue, the traditional colours of the marathon, police said. The street was open to pedestrians at the time, and police said his presence was not a security breach.

The backpack was destroyed. Police determined that the bag's contents were not explosive.

According to a police report read aloud in court, after Edson was read his rights, he told an officer: "I knew what I was doing, it was conceived in my head. It's symbolism, come on. The performance got the best of me."

In a statement, his family said, "Our family is so sorry and emotionally overwhelmed by the events at the finish line of the Boston Marathon yesterday. To have this happen on the one-year anniversary of such a horrific crime is unfathomable."

Edson's mother, Joie Edson, said her son has battled bipolar disorder for many years and his mental state has recently deteriorated.

Parsons The New School for Design and the Fashion Institute of Technology, both in New York City, confirmed that Edson had taken classes at their schools but never graduated. The Massachusetts College of Art and Design posted a statement on its website saying that an undergraduate student had been arrested by police and the school was co-operating with authorities, but it did not mention Edson by name.

A second suspicious backpack also was found Tuesday. Officers determined it had been left behind by a media outlet and was not dangerous, but it too was destroyed.

The backpacks rattled nerves days ahead of this year's marathon. Police kept people away from the finish line area for about three hours Tuesday and trains bypassed the nearby Copley Square station.

Police discouraged spectators from bringing backpacks to this year's race and said those carrying them are likely to have them searched.

"This year, we can all understand that someone is going to feel anxious, nervous, to stand next to someone with a backpack," said Kurt Schwartz, the state's undersecretary of public safety. "Why do that this year?"