Updated

The brother of the suspected Florida high school gunman was sentenced to time served and six months of probation Thursday after he was arrested for trespassing onto the grounds of the school where his sibling killed 17 people.

Zachary Cruz, 18, pleaded no contest to a trespassing charge. Along with probation, Judge Melinda Kirsch Brown also ordered Cruz to enroll in therapy, wear an ankle bracelet and said he cannot possess firearms or ammunition.

Cruz was arrested March 19 after police found him skateboarding at Marjory Stoneman Douglas High School after class let out.

Cruz was ordered to stay away from the campus, but officials said he still went through locked doors and gates on the property. The incident was captured on security footage that was released last week.

Cruz wanted to “reflect on the school shooting and to soak it in," according to an arrest report.

He was held on $500,000 bail, which his attorneys were expected to argue is excessive. His bond was originally $25, typical for such a case.

Cruz is the younger brother of Nikolas Cruz, who allegedly opened fire inside the high school, killing 17 students and staff members on Valentine's day.

The Cruz brothers attended Stoneman Douglas but didn't graduate.

Nikolas, 19, was charged with 17 counts of premeditated murder and 17 counts of attempted murder.

Fox News Elizabeth Zwirz and The Associated Press contributed to this report.