The older brother of the 12-year-old boy shot and killed in Mattapan was arraigned yesterday on gun charges in connection to the fatal shooting in a case that had family in tears in court.

Walter Hendrick, 22, of Mattapan, was arraigned at municipal court in Dorchester on charges of improper storage and unlawful possession of a firearm and ammunition. Hendrick posted $2,500 bail and is scheduled to return to court on Sept. 6.

Hendrick’s arrest was announced late Thursday, just hours after the 2:06 p.m. call that sent police to the horrifying scene where a 12-year-old boy was suffering from gunshot wounds inside 35 Fessenden St. in Mattapan.

The boy was rushed by ambulance to Boston Medical Center but pronounced dead there at 2:42 p.m., according to a police report filed with the court.

It was apartment two in the triple-decker where the alleged crime was purported to have happened, according to a reading of the charges by the clerk in the First Session Courtroom.

Another child, age 9, was also in the apartment at the time of the incident, according to a police report. Hendrick is the older brother of the shooting victim, she said.

A police report notes that officers say they found a fired semi-automatic shell casing at the scene, as well as a semi-automatic firearm “as well as a black fanny pack which the defendant stated he kept his firearm inside of.”

“During the course of an interview of the defendant, he stated the gun used in this crime was his,” the report alleges.

Hendrick hid behind a door in the holding area outside the courtroom, with the pool photographer only catching glimpses of his hair and the side of his face as his defense attorney spoke on his behalf.

The defense attorney asks for personal recognizance in this matter, saying that he is processing the grief of losing his brother and his family is in the courtroom in his support.

“They want him home. I think this is something Mr. Hendrick is going to need to process as well,” she said. “This is something the family will make sure he responds to.”

He’s expecting a child next month, he has a pending job, she added. He has no criminal record, according to both the defense and the prosecution.

The first two rows on the right in the courtroom filled just before 10:45 a.m. while the court was in recess. Family members clung to each other as a bailiff walked over with a box of tissues. The person closest to the aisle took the box with a nod of thanks, and took a couple tissues with a shaking hand.

Outside the courtroom, one family member expressed the difficulty of the moment.

“My feelings are numb until we get answers,” Diane Ellis, the grandmother of the victim, told members of the media. “They gave us no answers in there.”