MARTINEZ (CBS SF) — A man who allegedly killed his wife Thursday in Walnut Creek and held police at bay in Martinez until Friday afternoon was charged with murder Tuesday, prosecutors said.

Gregory Prokopowicz, 38, allegedly killed 47-year-old Roselyn Policarpio at around 1:30 p.m. in the 1900 block of First Avenue, according to police.

Prokopowicz and Policarpio were husband and wife, police said, although it was not immediately clear how long the two had been married.

After a 19-hour standoff, Prokopowicz was arrested at 2:11 p.m. in Martinez.

A suspect in the killing of a Walnut Creek woman surrender to SWAT officers after an 18-hour standoff in Martinez, April 28, 2017. (CBS)

Prokopowicz will appear in court Wednesday at 8:30 a.m. in Martinez.

In the standoff, Prokopowicz was allegedly armed with a gun and two knives. He threatened to harm himself when he put the gun to his head, police said.

SWAT team officers tried to get Prokopowicz to surrender by firing a less-than-lethal sponge round at him, which hit him in the ribs.

Prokopowicz, however, did not give up until the SWAT team fired three rounds of tear gas into the car where he was holding authorities at bay, according to police.

TM and © Copyright 2017 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2017 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Bay City News Service contributed to this report.