Boston saw its first two homicides of 2014 on Thursday night, hours after Mayor Martin J. Walsh formally named Boston police veteran William Evans as the department’s commissioner.

The killings occurred in separate incidents about five hours and 2 miles apart, in sections of Hyde Park and Roslindale.

In the first homicide, one man stabbed another during a heated dispute outside 139 Margaretta Drive, according to police spokesman David Estrada. The victim, who was not named, was pronounced dead at the scene, police said.

Advertisement - Continue Reading Below

Estrada said that the confrontation occurred about 6 p.m., and that the victim and assailant knew each other. The suspect sustained minor injuries in the scuffle and was taken to a local hospital in police custody, Estrada said.

The second killing took place in the area of 136-138 Rowe St. in Roslindale about 11:10 p.m., police Superintendent in Chief William Gross, whom Evans promoted earlier in the day, said at the scene.

Gross said the victim, an unidentified man, was shot several times on the street and pronounced dead at the scene. He said police did not yet have a description of the assailant, and there was no indication that the shooting was linked to the earlier stabbing.

“This is a very quiet area right next to a main thoroughfare,” Gross said of Rowe Street, which is located off Cummins Highway and is near a community garden.

Gross urged anyone with information to contact police.

In Hyde Park, a 21-year-old woman said she heard part of the exchange that led to the fatal stabbing.

“It sounded like people were fighting or arguing, and then I got scared and I didn’t hear anything else,” she said.

Later, she and a friend said, they saw a body covered by a sheet lying in a parking area, with two knives and a patch of blood visible on the pavement.

District 5 City Councilor Timothy McCarthy, 43, a lifelong Hyde Park resident who was sworn in to represent the neighborhood and part of Roslindale on Monday, said he had coached Little League baseball at a field near the stabbing scene when his teenage sons were younger.

“Anything like this is a tragic event,” McCarthy said. “I know that with Commissioner Evans now firmly in grasp of the Boston Police Department, I’m sure that they will work their hardest to find out exactly what happened.”

Evans, who had been at the Hyde Park crime scene, could not be reached for comment Thursday night.

There were 40 homicides in Boston in 2013, with the first occurring in Allston at a New Year’s Eve party in the early hours of Jan. 1.