The 20-year-old man accused of fatally shooting five people at a Macy’s store in Washington state before evading a manhunt for 24 hours was charged with five counts of first-degree murder Monday morning.

Arcan Cetin stood calmly before a Skagit County District Court judge and said he understood the charges, each of which carries a minimum of 20 years in prison. His bail was set at $2 million.

The packed courthouse about 60 miles north of Seattle included tearful family members of some of the victims. Cetin’s mother was visibly distraught.

Cetin admitted to the shooting to detectives, according to court documents released Monday by the Skagit County Superior Court. Authorities said they had uncovered no motive for the Friday evening attack in Burlington. When investigators interviewed Cetin’s stepfather, David Marshall, about his son’s whereabouts, he told them he had dinner with Cetin earlier on Friday and also discovered that his Ruger rifle and ammunition were missing, according to court documents.

“The only thing that we want to say at this time is that we both are totally devastated by what happened,” Marshall told reporters after the hearing. He said that Cetin had unspecified mental health problems.

According to documents, detectives said surveillance video showed it took Cetin only about one minute to shoot all five victims — a teenage girl near some clothing racks, then four adults in the makeup department.

After the shooting, Cetin left the Ruger rifle with a 25-round magazine on top of a cosmetics counter, then fled the mall in a vehicle, the documents said.

A legal permanent resident of the United States who immigrated to this county as a young child from Adana, Turkey, Cetin graduated last year from high school in Oak Harbor, a rural community in western Washington about 30 miles from the mall where he is accused of opening fire. Sheriff’s deputies apprehended him Saturday evening as he was walking on a sidewalk hear his home, carrying a satchel with a computer inside.

Oak Harbor is a military town on Whidbey Island, reached by bridge or ferry, where visitors are welcomed by two radar-jamming EA-6B Prowler aircraft. Gung-ho locals call the constant roar of Navy aircraft “the sound of freedom.”

The manager at Anchor Pointe Apartments, where Cetin lived, said owners had told her not to talk about their tenant. “I’m as clueless as everyone else,” she said.

His apartment on the second floor has a porch with an orange and brown lounger, a coffee cup with yellow tulips and a big red daisy clipped to the deck. His mother and stepfather help pay the rent, she told investigators, according to the criminal complaint, and had visited him there on Wednesday.

Court records indicate a string of charges in which he’s accused of assaulting his stepfather and court requests for mental-health evaluations, as well as court requests for substance-abuse evaluations. It is not clear from the records how the cases were resolved.

A Navy base spokesman confirmed to The Washington Post that Cetin worked at the commissary on the base between 2012 and 2013 when he was in high school.

The spokesman said Cetin was a dependent of a Navy retiree but did not specify who that was. Because of that, he said, Cetin also had a dependent’s identification card that allowed him access to various facilities at the Naval base, including the gym, which Cetin used.

Friends and neighbors described a young man who had gotten in trouble with the law several times, with three assault charges since 2015.

Several of Cetin’s former classmates described him as a socially awkward teenager who later was given to inappropriately touching female students.

Mehmet Ecder, an 18-year-old high school student who grew up with Cetin in Adana, Turkey, said Cetin came from a troubled family and was struggling to connect with American girls after he moved to Washington state. He liked living in the United States, but, “He says, ‘American girls hate me,’ ” Ecder said in an interview from Turkey.

Cetin had mentioned a young woman who had rejected him, Ecder said.

“He says he doesn’t know how to talk to girls,” said Ecder.

Cetin is Muslim, said Ecder, but was never particularly observant.

Cetin apparently worked at the Wendy’s on base. Taylair Graham, 16, said Monday that Cetin was quiet, “but he wasn’t really all there.” Bryce Atwood, 16, has a cousin who works with him at Wendy’s. Of Cetin, he said, “He was a pretty chill guy, and then he decided to just go . . . shoot up a mall.”

Abigail Hauslohner, Julie Tate and Alice Crites contributed to this report.