The CIA headquarters in McLean. (Alex Wong/Getty Images)

A man who drove his car into a fence at CIA headquarters in Virginia earlier this year explained Tuesday in court that he suffers from bipolar disorder and was experiencing a manic episode at the time.

“It has always been difficult for myself and my family,” Thomas Luu told a judge in Alexandria federal court as he pleaded guilty to damaging government property. “I’ve been working hard to make changes.”

Just after 2 a.m. on June 13, Luu rammed his Ford Focus into an eight-foot gate outside the CIA headquarters so hard that the fence broke. When a security officer arrived at the scene, Luu was kneeling on the ground next to his car with his hands behind his head. He told the officer that he had been recruited by the CIA and was trying to get the agency’s attention.

His attorney, Cadence Mertz, told the court Tuesday that Luu has struggled with his mental illness for 15 years. However, she said, he is now getting regular therapy, taking his medication and has reached “a new insight into his illness.”

Luu was sentenced to 30 days in jail and two years of supervised probation. He will have to pay $1,141.76 in compensation for the broken gate.