Police block streets in a standoff with a man barricaded in an apartment Tuesday at 1630 Irving St., NW. (Bill O'Leary/The Washington Post)

A 55-year-old man who was fatally shot by D.C. police Tuesday after an hours-long standoff at his Northwest Washington home had a history of erratic behavior, his neighbors said.

Jean E. Louis, who lived in the 1600 block of Irving Street, allegedly stabbed an officer in the arm with a sharpened screwdriver about 1:30 p.m. and then barricaded himself in his Mount Pleasant apartment as police tried to persuade him to surrender.

Louis, a Haitian immigrant whose occasional ranting unnerved some neighbors, was shot to death about 5:30 p.m. by officers who said Louis lunged at them with screwdrivers as they tried to enter the apartment to arrest him. Police said Wednesday that the shooting remained under investigation.

Several neighbors said that they did not know Louis well but that his aggressive behavior before the shooting did not surprise them.

“Sometimes he acted weird,” said Patricia Pineda, 19, who lives in the building where Louis was shot. Pineda said she saw Louis lying on the pavement outside the building for no apparent reason a few weeks ago.

Tuesday’s incident was not Louis’s first run-in with police. Just after 1:30 a.m. Oct. 24, officers answered a call about a man standing in the street in front of the apartment building, screaming and blocking traffic.

The man, later identified as Louis, was “agitated” and behaving “irrationally,” the officers said in a report. When they told Louis to calm down and get off the road, the report says, he “walked into the middle of the street and stood there.”

He fought with the two officers when they tried to remove him from the street, the report says. He was charged with assaulting a police officer and resisting arrest. After he failed to appear in court in November, a warrant was issued for his arrest.

Neighbors in the four-story gated apartment building said Louis had lived on the fourth floor since the early 1970s. They said his father and two brothers lived there for many years but had moved out. Two neighbors said Louis’s mother lived with him for a few years before her death.

He spoke rudimentary English, neighbors said. In calmer moments, as he stood outside smoking cigarettes, he would greet people with a smile as they passed by.

“When I see him, I say, ‘Hello,’ and he always says: ‘Hi, how are you? Okay?’ ” said Luz Onofre, 71, who has lived in a second-floor apartment in the building since 1962.

Onofre and another longtime resident, Lucrecia Rodriguez, 75, recalled an incident more than a decade ago in which police were called to Louis’s apartment after a shot was fired. Shortly afterward, the neighbors said, Louis entered a mental-health facility. But months later, he moved back into the apartment building.

About three months ago, Rodriguez said, she called police after Louis tried to block her from entering the building, where she has lived for 46 years.

She said he was sitting on a chair by the entrance and screamed: “Don’t go inside. What are you doing? You can’t go inside. You stay there.”

Police said officers went to the building Tuesday afternoon to assist city mental health workers who were trying to take Louis to a psychiatric facility.

At the door to the apartment, Louis lunged at the officers with the screwdrivers before barricading himself inside, according to police. The officer who was stabbed in the arm was treated at a hospital and released.

As heavily armed members of the police emergency response team surrounded the building, officers tried in vain to talk Louis into surrendering, authorities said.

About 5:30 p.m., thinking that Louis had passed out or fallen asleep, officers entered the apartment. Louis then attacked them, said police Cmdr. Hilton Burton.

Fearing for their safety, the officers “had to use deadly force,” Burton said.