Brian Kern woke on the bench where he had been sleeping, vaguely aware that someone was hitting him. Hard.

His vision was blurry, but he could see his arms were bleeding.

Kern, 26, thought he was dying. But when a police officer arrived, he didn’t ask for help. “You’ve got to find my brother,” he said.

His twin, Tim Kern, had awaked to Brian’s screams. Then, a moment later, someone whacked him in the back of the neck.

Dazed and bleeding, he grappled with the man. If he could distract the assailant, he thought, maybe the man with the machete would spare Brian.

“Maybe one of us can get out of this alive,” Tim recalled thinking. “I figured I wasn’t going to make it.”

Life had been rough for the Kern brothers long before the harrowing June night when, with nowhere to live, they slept on benches outside the Arlington County Central Library. Since their mother’s death about seven years ago, they had endured several spells of homelessness, multiple arrests for nonviolent offenses, one short-lived marriage for Tim, unemployment and estrangement from their father. But the two always have been able to turn to each other.

What sparked the June 24 assault remains unclear. Authorities say the twins initially said they had an argument with Derrick Sutherland, 28, another homeless man, and that he returned around 3 a.m. to attack. But the twins said in an interview that they had seen Sutherland in passing but never exchanged words. Sutherland is scheduled to appear in Arlington court Monday for a preliminary hearing on two counts of malicious wounding.

What is clear is that five weeks after the night they went to sleep in a spot they thought was safe, the Kern twins face a new set of painful challenges.

Tim’s collarbone was broken that night. During a three-day hospital stay, he received staples in his shoulder and neck, and stitches up his arm. He suffered a knee injury so now walks with a cane.

Brian spent nearly two weeks in the hospital and still needs two more surgeries — one to remove the injured eye that he currently covers with a patch and one to repair his right wrist. Both of his wrists and at least three of his fingers were broken.

With bulky dressings on both arms, he struggles with simple tasks throughout the day at the homeless shelter where the brothers are staying. Putting on a shirt now takes eight or nine minutes for Brian. Taking a shower requires Tim tying plastic bags over both of Brian’s wrists.

Tim’s help for Brian and Brian’s support for Tim seem to be the only constants in their lives. Raised in Herndon, they rarely have had a steady address since they finished high school.

Brian attended Northern Virginia Community College for one semester after high school but did not register for a second term.

“I left just ’cause I was doing pretty poorly. I just thought I needed a break,” he said. “I thought I’d be back.”

Tim enrolled for several semesters, hoping to earn an associate degree in music. But he often failed to complete his courses. At that point, the brothers were moving from place to place, making it hard to attend class and complete homework regularly.

Tim taught private guitar lessons whenever he could, and Brian worked as a cashier at Dulles International Airport. Two years ago, his manager reassigned him to a graveyard shift, which meant he couldn’t catch a bus to work. He quit, assuming he could find a more accessible job. He couldn’t.

Tim’s marriage was breaking up around the same time. Sometimes, when he was teaching, he paid the rent on apartments the twins shared. Sometimes they crashed on friends’ couches or slept on the street.

By day, they looked for jobs using computers in a local library and sought free food at a neighborhood church.

Brian slept in shelters on especially cold nights once in a while, but Tim was always leery of them.

Although the twins say they are grateful they can stay at the shelter while they recuperate, Tim said the setting still makes him nervous.

“There’s just something about sleeping in a room with that many people,” he said, “especially after this happened. You don’t know who’s going to be in there.”

Sutherland has been behind bars since the afternoon after the attack. But Brian still worries. Fearful that the suspect might have friends who would harm them, he asked that their current location and photographs not be published with this article.

“Tim says yeah, he’s just a bum. But I’m sure somebody would have said that about me, but I have plenty of friends,” Brian said.

Tim looked surprised. “I never thought about it that way.”

In the days they spent in the hospital, the Kerns realized just how many friends they have. Acquaintances they had long lost touch with, from as distant as their elementary school days, showed up beside their hospital beds and created a Facebook page asking for donations.

Tim said he had come to expect little help when he and Brian were sleeping on the streets. The outpouring of support surprised him. Acquaintances steered them to a motel and then a shelter after they left the hospital, helped coordinate their doctors’ appointments and paid some of their medical bills.

Fourteen friends contributed about $2,000, according to Alley Borda, who helped start the collection. A primary concern is helping Brian get his eye surgery soon, because a doctor told him the infection could spread to his other eye if the injured one is not removed quickly. The brothers are counting on a fund for victims of violent crime to help pay the bulk of the cost.

At the shelter, service workers say they will help the twins search for employment and housing. But the brothers’ minds are still focused on their daily pain and a night they cannot forget or understand.

“It’s one of the only things I can think about,” Brian said. As Tim, more talkative than his twin, described the events in detail, Brian often put his head down on his bandaged arms.

Tim, too, dwells on the night of June 24. “I try to think, like, what could I have done differently? Or how could I have better protected Brian? I just always wish there was something I could have done,” he said.

But he also acknowledges gratitude for the fact that his twin was by his side. “I don’t even want to imagine what going through that alone would have been like.”

Now, he envisions brighter prospects ahead. After Brian’s surgeries, after Tim discards his cane, he is confident they will stand strong.

“I think everything’s pretty much in our hands,” Tim said. “There are emotional distresses after going through this, but I don’t want to let it get in the way of getting my life together.”