An investigation is underway after police in San Bernardino shot and killed a man who was allegedly threatening a woman with a knife.

Investigators say it began when a man flagged down a police officer near the 500 block of North Tiajuana Street around 11:30 a.m. Saturday and reported some sort of confrontation with another male.

He told police that the man "stabbed at" his car with a large knife. The suspect then retreated into a house.

The officer went to that house and attempted to contact the suspect, police said. When the officer was nearing the front entrance of the home, he said he saw a man in the doorway holding a knife and also holding a woman in a threatening manner.

The officer also saw two juveniles in the house.

When the officer ordered the man to put the knife down, he refused and started yelling something similar to "shoot me." That's when the officer-involved shooting took place.

The 49-year-old suspect died at the hospital. This is an ongoing investigation. If you have any relevant information, you're urged to contact police.