Westbrook police have arrested a 30-year-old man who allegedly smashed a cab driver’s windshield and then shot at him Sunday night, according to the cab driver.

Keith O’Brien of Westbrook was charged with criminal threatening with a dangerous weapon, aggravated reckless conduct with a dangerous weapon and falsifying physical evidence, police said Monday.

The cab driver told police that he was driving a man and a woman through Westbrook “when the man threatened him and made disparaging comments about his ethnicity before exiting the cab and smashing its windshield,” according to a press release from Westbrook police Captain Michael Nugent.

The driver said he then called 911 and proceeded to follow the man and woman on foot to a home on Carlson Street. The driver said the man then came outside and fired a gun at him.

Police executed a search warrant on the home, then arrested O’Brien, who was taken to Cumberland County Jail.