A man in a wheelchair was seriously wounded Thursday in a stabbing outside a Southeast Washington church shortly after the funeral of a homicide victim, police said.

Although the stabbing victim remained alive in a hospital Thursday afternoon, police said, his wounds were so grave that homicide detectives took over the investigation.

The attack occurred in Anacostia, about a block from the Delaware Avenue Baptist Church at 13th and V Streets SE, police said.

Detectives are trying to determine whether the stabbing was related to a spate of gunfire April 6 in which two men were slain and two were wounded. Those shootings occurred late at night in two locations a few blocks apart in the violence-plagued Washington Highlands neighborhood at the city’s southern tip.

The stabbing occurred about noon at 13th and U Streets SE, a block north of the church. Mourners had just left the church after the funeral of one of the April 6 victims, 22-year-old Reginald L. Williams Jr., who lived in Northeast.

It was not immediately clear whether police had posted officers outside the church for security, as they often do at funerals for homicide victims. Authorities have long said that most slayings in the city are retaliatory killings. It is not unusual for lethal violence to erupt outside churches before, during or after victims’ funerals.

Williams and a companion, Joshua Ruffin, 20, of Southeast Washington, were fatally shot about 11 p.m. April 6 in the 700 block of Yuma Street SE. About an hour earlier, two other men were shot and wounded in the 900 block of Wahler Place SE just a few blocks away. Those two victims survived.

At the time, police said they were trying to determine whether the two double shootings were connected.

Ruffin’s funeral, held Wednesday at a different church in Anacostia, took place without incident.