As officers closed in during a widespread manhunt on Wednesday, the suspect put a gun to his head and pulled the trigger. He died at a hospital, a hospital spokeswoman said.
The five victims brought the number of homicides in Seattle so far this year to 21, matching the total for all of last year, and left city leaders wondering what could be done to stop the bloodshed.
"Two tragic shootings today ... have shaken this city," Mayor Mike McGinn said at a news conference. "It follows on the heels of multiple, tragic episodes of gun violence that have occurred throughout the city."
In the last month, there had already been two random killings. A man died last week when he was hit by a stray bullet as he drove, and a woman was killed in a drive by shooting in late April. No arrests have been made.
Police did not publicly name the suspect in the shootings, but the Seattle Times identified him as Ian Lee Stawicki, 40, of Seattle, citing unidentified law enforcement sources.
Andrew Stawicki, 29, of Ellensburg, told the Times he recognized a photo shown on TV newscasts of the alleged gunman as his brother Ian. Andrew Stawicki said Ian Stawicki was mentally ill.
"It's no surprise to me this happened," he told the newspaper. "We could see this coming. Nothing good is going to come with that much anger inside of you."
A phone number for Andrew Stawicki rang busy when The Associated Press tried to reach him for comment.
Gunfire erupted about 11 a.m. at Cafe Racer, a restaurant and music venue north of the University of Washington.
Police quickly released two photos from inside the cafe, apparently taken from a security camera. One showed a man walking into the establishment, with a woman nearby reading a book and people chatting at the nearby cafe bar. Another photo about a minute later showed stools overturned, and the man standing and holding what appeared to be a handgun.
Two men died at the cafe, and a third man and a woman from the cafe died at a hospital.
Police said it appeared the gunman fled to the First Hill neighborhood near downtown, where he fatally shot a woman in a parking lot and stole her SUV.
He then drove the SUV to West Seattle and ditched it, leaving a gun in the car. After officers found the vehicle, they flooded that area with uniformed and plainclothes officers.
A detective spotted the suspect later and called for backup and a SWAT team, Assistant Police Chief Jim Pugel said. As those officers arrived, the man shot himself, he said.
A King County medical examiner's spokeswoman said her office might be able to release the dead victims' identifications Thursday.
One man wounded in the cafe shooting was reported in critical but stable condition at Harborview Medical Center following surgery. Hospital spokeswoman Susan Gregg confirmed his name as Leonard Meuse. Meuse's father, Raymond Meuse, told the Times his son was shot in the jaw and armpit but was expected to survive.
Evan Hill, who lives above the building where the shooting happened, said the cafe was an artists' collective and performance space.
"It's the strangest place to think of a shooting," said Hill, who heard four to five shots. He said he ran to his balcony and called 911, but didn't see a suspect.
On a corner across from the cafe, friends of the victims gathered by the ivy-covered wall of an apartment building. Some collapsed in grief. The cafe's owner hugged them and commiserated.
Units of police officers marched by with rifles and shotguns, knocking on doors and checking driveways and yards in the neighborhood of single-family, bungalow-style homes, restaurants and businesses.
During the manhunt, Roosevelt High School, Eckstein Middle School and Greenlake Elementary were locked down, according to the school district.
In other recent violence to hit Seattle, a bystander was wounded near the Space Needle Saturday when he was struck by a bullet that police say was fired by a gang member involved in a dispute with another man. Later that night, about 60 shots were fired in drive-by shootings at four houses. No one was hit.
Besides a plan to increase the number of officers on patrol in high-crime areas, police are urging people with information about shootings to come forward. They also said Seattleites could expect an increased police presence in the near future.
City councilman Bruce Harrell said leaders needed to consider everything - from changing laws to addressing the culture of violence.
"If we are to be honest, there's no easy fix," he said.