The NYPD said an officer shot a man in the hip inside a Manhattan building Tuesday evening after he claimed he had a gun and pointed an object at officers — as object sources said turned out to be a wallet.

It happened shortly before 5:50 p.m. at a building on West 114th Street near Adam Clayton Powell Jr. Boulevard in Harlem.

The officers, who responded to reports of a man wielding a gun inside the building, said they found a man matching the description on the fourth floor.

The officers, who were 15 to 20 feet away from the man, demanded he take his hand out of his pockets, but he refused and said he had a gun. Police said one of the officers fired three shots at the man, striking him once, when he then pointed an object at them.

Multiple police sources told NY1 the object was a wallet, and that he pointed it like a gun.

The man, who has not been identified as of this writing, was transported to a local hospital and is expected to survive. The officers were taken to the hospital for evaluation.

The police department said the shooting was caught on the officers' body cameras.

Authorities said the man's mother had an order of protection against him.

The NYPD is investigating.