A 44-year-old Ohio man who apparently demanded to get into the White House Thursday night was arrested by the Secret Service after he allegedly assaulted a police officer and resisted arrest, authorities said.

Peter S. Theado of Elyria, Ohio, was ordered held Friday for a competency screening after a court appearance.

According to a D.C. police report, at about 8:40 p.m. Thursday, Theado was near the East Executive Avenue entrance to the White House grounds and demanded to get inside. When he was told he wasn’t allowed in, he “became agitated and punched an officer in the head with a closed fist,” the report said.

Officers fought with him and took him into custody where he threatened an officer, police said.

Theado was treated for injuries from the struggle with officers, police said, and released into police custody.

Operations at the White House were not affected, according to the Secret Service.

Theado has had several encounters with law enforcement in the District.

In January, Theado had been in the city and taken to a hospital for psychiatric counseling, police said. He was charged with hitting a nurse in the face with his fist, police said. He was released from custody and an assault charge is pending.

In December, police charged Theado with unlawful entry after authorities said he ordered food at the Trump International Hotel but could not pay. Police said he had been barred from the hotel in the past, and has a pending case on unlawful entry charges in the alleged December incident.

In January 2017, Theado was convicted of unlawful entry after he parked a Nissan Altima on the Ellipse, an area near the White House that is off limits to vehicles. He received a 10-day suspended jail sentence. In an arrest affidavit, police said Theado had repeatedly been turned away at White House entrances. In one instance, he threatened, “I’m going to kill myself if I don't talk to Barack Obama,” the arrest affidavit says.

Last week, a 26-year-old Alabama resident fatally shot himself outside the White House.

And a Tennessee woman was arrested and charged Feb. 23 after officials said she tried to drive her vehicle through a White House barricade.

The woman, who had stopped taking psychiatric medication, believed her fiance and four children were being housed in the executive mansion, according to a government evaluation and court documents.