The search for the suspect in Sunday’s deadly Metrobus shooting in Southeast Washington led authorities far from the District, to a tree-lined residential street simply called Fairway on the edge of a golf course on Long Island.

D.C. police had somehow tracked Javon S. Foster, 27, to the village of Hempstead, N.Y., a 30-mile drive from Manhattan, where members of a U.S. Marshals Service fugitive task force closed in Monday evening.

In the driver’s seat of a Honda that police said Foster frequently drove, they found a man fitting his description — dead of an apparently self-inflicted gunshot wound and alone.

Why Foster went to that spot five miles from the Long Island Expressway — and how police knew to look for him there — remains unclear. Investigators said he had no known family or friends in the area, and police in the District and Nassau County, N.Y., declined to discuss the search.

On Tuesday, the dead man was identified as Foster, officials said. D.C. police did not publicly release his name until after Foster was identified by his fingerprints.

Javon Foster (Courtesy D.C. Police )

The discovery in Hempstead came hours after D.C. police released a photograph of Foster and said he had been charged in a warrant with second-degree murder in the death of 20-year-old Selina Brown, whom he had been dating.

Their 23-month-old daughter was wounded in the shooting on Minnesota Avenue. A witness said that Brown was attacked as she carried her baby aboard the bus after an argument.

Brown’s step-grandmother said relatives believe that Brown severed or tried to sever her relationship with Foster.

In February, Brown petitioned the court for sole custody of the child and described her relationship with Foster as abusive, according to court documents. But it was unclear whether the two broke up.

Foster’s mother, 46-year-old Sheila Foster, said in a brief interview Tuesday that her son and Brown were together — and still a couple — on Sunday before the shooting.

“I’m very, very sorry about this tragedy,” Foster said. “It’s a tragedy on both ends, and I feel for Selina’s family. I’m grieving as they are.”

Foster said she had no idea why her son might have driven to Hempstead: “I don’t know why he went out to New York.”

Police have not detailed their search. A man in a house listed as Foster’s address in Southeast shouted through the door on Monday that he did not want to talk. A police source had said officers searched that address.

Authorities would not describe how they tracked Foster. Kevin Engel, supervisory inspector of the New York/New Jersey Regional Fugitive Task Force, said that detectives called his office and told him the area they thought the suspect was in.

Engel said task force members drove through Hempstead and found the car on Fairway, then found Foster inside.

Gerald Rugg, who has lived on the street for 40 years, said that “police cars swarmed around. There wasn’t any sirens or nothing. All I saw was a bunch of lights.”

Engel said that a handgun was found in the car and that authorities were awaiting ballistics tests to determine whether it was same one used in the Metrobus shooting.