He parked his truck in front of the Department of Veterans Affairs building on Vermont Avenue NW, walked a block south to the White House and demanded to speak to the president. When rebuffed, according to investigators, he told a U.S. Secret Service officer that his truck contained a bomb.

“Don’t touch the keys in the ignition or else something bad will happen,” the man said early Wednesday, according to documents filed in federal court. “I don’t care if children or veterans are harmed by the bomb. I only care about speaking to the president.”

Authorities scrambled to close off streets around McPherson Square. Within 21 / 2 hours, members of the D.C. police department’s explosive-ordnance team concluded that it was a false threat. Traffic returned to normal by 6:45 a.m., before the worst of the morning rush, and a 44-year-old man from Pennsylvania was arrested.

Krzysztof Wasik, of Hazle Township, Pa., was charged with threatening and conveying false information related to the use of an explosive. The offense carries a maximum penalty of 10 years in prison and a $250,000 fine.

Wasik’s attorney requested a mental-health examination for the suspect, who was being held without bond until a detention hearing set for Monday.

It was the second scare near a prominent government building since Sunday, when police said a man from Florida parked a car, containing three guns and more than 100 rounds of ammunition, near the U.S. Capitol. A suspect in that case, Ty C. Mitchum, 59, of Clearwater, has been ordered to undergo a psychological exam.

In Wednesday’s incident, police said the suspect left his truck cab just north of Lafayette Square. About 4:30 a.m., the man approached a uniformed Secret Service officer at the White House fence line on Pennsylvania Avenue and said he wanted to speak to President Obama about truck regulations and fines he’d had to pay, according to an affidavit.

Authorities detained Wasik, and the Veterans Affairs building was evacuated. Brian Leary, a spokesman for the Secret Service, said that the president and his family were home at the time but that the White House was not locked down.

Dressed in jeans and a black sleeveless t-shirt, Wasik appeared in U.S. District Court in the afternoon, surrounded by three deputy U.S. marshals. When asked by the courtroom clerk to swear to tell the truth, Wasik responded after a long pause, “I don’t know the truth.”

Sam Sanguedolce, first assistant district attorney in Luzerne County, Pa., said that Wasik has no criminal record in his jurisdiction.