(Reuters) - A man accused of fatally shooting a Washington state policeman before barricading himself inside a home with two children was killed on Thursday after a lengthy standoff with officers, police said.

The officer was shot while responding to a domestic disturbance call on Wednesday afternoon at a home in Tacoma, Washington, Tacoma Police spokeswoman Loretta Cool told reporters. He was pronounced dead at a nearby hospital.

"We've suffered a great loss, and I think the community has suffered a great loss," Cool said.

The suspect then barricaded himself inside the house for about 12 hours while officers tried to coax him out, police said. At about 3:30 a.m., a SWAT team entered the building and the suspect was killed.

Details about the death were not immediately released.

Pierce County Sheriff's Office spokesman Ed Troyer told reporters that officers knew there were children inside the house. "He was using them as a shield," Troyer said.

Officers rescued an eight-year-old boy and an 11-year-old girl, Northwest Cable News reported. Police have not identified the suspect or the fallen officer.

(Reporting by Laila Kearney; Editing by Bernadette Baum)