Image caption Chief Wilson said the gunman had a permit to carry a gun

A man killed his girlfriend and three others before police shot him at an apartment complex south of the US city of Seattle, police say.

The 27-year-old gunman, who has not been identified, killed three men who either witnessed the initial killing or tried to intervene.

Responding police in the town of Federal Way shot the gunman when he refused to drop his shotgun.

He fled and police shot him again minutes later when he drew a handgun.

"We believe this is a domestic violence homicide," Federal Way Police Chief Brian Wilson said at a news conference on Monday.

He said after killing his girlfriend in the flat they shared, the gunman confronted a 24 and 26-year-old man and shot them both dead.

Among the dead was a 62-year-old man who left his apartment to investigate the commotion, then retreated back side.

He was shot and killed when the gunman broke down his door, Chief Wilson said.

The gunman had a valid concealed weapons permit and no criminal history, he said.

Federal Way is about 20 miles (30km) south of Seattle.