A Bay Shore man was charged Wednesday with shooting his friend while robbing him and leaving the body in the woods behind an abandoned former Kmart in Middle Island.

Michael Dirkschneider, 30, pleaded not guilty to an indictment charging him with first-degree murder and criminal possession of a weapon. He is accused of shooting Alexander Incorvia, 26, three times in the head, including once in the face.

Incorvia had been living at a hotel in Medford.

Suffolk Assistant District Attorney Kathleen Kearon said the men had been friends for the past few years, but on March 29 Dirkschneider decided to rob Incorvia and killed him while doing so.

Dirkschneider then drove to his wife’s job, where she saw blood on his face and clothes. She notified police that her husband had killed Incorvia on April 2 — the day Incorvia’s body was found by a woman walking her dog, Kearon said.

Police then searched Dirkschneider’s home and car. Kearon said police found a handgun in his dresser drawer, and ballistics tests show that it was the murder weapon.

In the car, she said police found “a large amount” of cash stuffed in the center console.

advertisement | advertise on newsday

“The evidence is overwhelming,” she said.

Defense attorney John Halverson of Patchogue did not ask for bail and did not comment, noting he was assigned to the case just moments before the arraignment in Riverhead. State Supreme Court Justice Richard Ambro ordered Dirkschneider held with no bail and signed an order of protection on behalf of his wife.

Incorvia’s family watched the arraignment and declined to comment afterward.

Kearon declined to say what led up the killing.

After Incorvia’s body was found, family members said they did not know why he was staying at the hotel. Employees at the hotel said he had been there only two or three days.