(CNN) Authorities are trying to restrict Zachary Cruz, the younger brother of Parkland shooter Nikolas Cruz, from having access to guns by using a new Florida law that passed in the aftermath of the school massacre.

Broward County Judge Jack Tuter on Wednesday granted a temporary risk protection order against the 18-year-old. The order prohibits Cruz from possessing or purchasing firearms or ammunition following his arrest Monday for trespassing at Marjory Stoneman Douglas High School, where his older brother killed 17 people.

A final risk protection order hearing is scheduled for April 3, when the judge will decide whether to bar Cruz from having guns for an extended period.

The Broward County Sheriff's Office sought the order on Tuesday using part of the new Marjory Stoneman Douglas High School Public Safety Act, which went into effect earlier this month. The act lets law enforcement officers temporarily seize firearms from someone they're taking into custody for an involuntary mental health assessment.

On the same day, a judge set Cruz's bond at $500,000 for a misdemeanor trespassing charge and required a psychological evaluation. Cruz's defense attorney argued that his client was being punished for his brother's crime with a $500,000 bond for a charge that usually carries a $25 bond. The judge on Tuesday ruled that deputies can search Cruz's home in Lantana, Florida, for guns.

In the temporary order, Tuter noted that the sheriff's office did not allege that Cruz owns guns. However, based on the allegations, the court determined there was reasonable cause to believe Cruz would pose "a significant danger of causing personal injury to himself" if he were to obtain a gun or ammunition, according to the order.

Questions about after-school security

After his arrest, Cruz had told deputies that it was his third visit to the school since the February 14 shooting, prosecutors said. He said he entered school property to "see everything and take it all in," according to the order.

His claim raised questions about safety and security at Stoneman Douglas.

"It is sort of weird to think about it. Like, we have all this police on campus, and still he got on and was able to skateboard around like that," student Ryan LoFurno told CNN affiliate WSVN.

According to arrest records, Cruz had "surpassed all locked doors and gates" at the campus despite warnings not to enter by school officials, and was arrested around 4:50 p.m. Monday. He has no ties to Broward County, the arrest record noted. He told police he wanted to "reflect on the school shooting and soak it in."

"Next time he wants to go soak in stuff, he can come to my house," Andrew Pollack, whose daughter, Meadow, was killed in the school shooting, told WSVN. "I'm not focused on one individual. I'm focused on lots of individuals that shouldn't be allowed to go onto a school campus."

The school called parents with a message about new after-school security plans, WSVN reported.

Florida Gov. Rick Scott on Tuesday offered to provide extra security at the school after several unrelated incidents: A deputy was suspended for appearing to fall asleep on duty there, two students were charged for allegedly bringing weapons to campus, and another student for allegedly making a threat of violence on social media.

Zachary Cruz was ordered by the court to wear an ankle monitor. He has also been instructed to have no contact with Stoneman Douglas students or staff, to stay at least a mile away from the school and to have no contact with his brother.