A college student pleaded guilty Tuesday to sneaking into Mar-a-Lago during President Donald Trump's Thanksgiving visit in a manner similar to how a Chinese national gained admission four months later.

University of Wisconsin student Mark Lindblom apologized Tuesday and received a year's probation after federal prosecutors agreed he meant no harm when he sneaked into the Palm Beach club. Lindblom, who was charged with entering a restricted area, was visiting his grandparents at a neighboring resort on Nov. 23 when he walked down a beach and got in line with entering Mar-a-Lago members and guests, wanting to see if he could get in.

Trump and his family were at the club for the holiday.

The Palm Beach Post reports Lindblom walked past signs warning that only authorized people were allowed entry. The 19-year-old business major from Washington, D.C., then went through a metal detector and Secret Service agents let him enter.

"I wanted to see how far I could get," Lindblom told Magistrate Judge William Matthewman. He said he did not realize how his actions would affect the Secret Service agents guarding the president. He said after watching online video of the 1981 attempted assassination of President Ronald Reagan, he now understands the dangers agents face.

"These men and women are dedicated to serve us and protect the president," he said. "I'm so sorry for wasting their time."

Assistant U.S. Attorney John McMillan told Matthewman that an investigation showed Lindblom's only goal was to gain entry and take pictures.

"We have no reason to believe he had a political, criminal or terroristic purpose," McMillan said. "It was a foolish decision he did on a lark."

Matthewman agreed, saying Lindblom committed "a youthful indiscretion more out of misplaced curiosity."

McMillan said security at Mar-a-Lago has since been tightened and Lindblom would not have been able to enter now.

Agents also let Chinese national Yujing Zhang enter Mar-a-Lago in March after she allegedly told them she was there to use the pool. She is awaiting trial and is facing more serious charges as prosecutors say she lied to agents. She was also found to be carrying cellphones, a computer and other electronic equipment. She has pleaded not guilty.