BATH, Maine — A 22-year-old Thomaston woman remains in critical condition Tuesday at Maine Medical Center after she allegedly was shot in the head Monday afternoon by her boyfriend in the parking lot at Shaw’s Supermarket.

Chelsea Jones, 22, of Thomaston was sitting in the front passenger seat of a sport utility vehicle when a gun her boyfriend was showing to a prospective buyer went off, according to a release from Stephen McCausland, spokesman for the Maine Department of Public Safety.

The gun was fired by 23-year-old Dylan Grubbs, also from Thomaston, who had driven to the parking lot to sell the handgun and was showing it to a prospective buyer outside the SUV when it went off.

The Maine State Police Major Crimes Unit has taken over the investigation into the shooting, according to Bath police Chief Michael Field.

Police went to the parking lot at Shaw’s Supermarket at about 3:40 p.m. and found Jones in a silver SUV with a gunshot wound to the head.

Bath police Lt. Robert Savary said Monday the gun apparently discharged accidentally.

Grubbs was interviewed by police and is cooperating with investigators, according to McCausland. The man who intended to purchase the gun, who witnessed the shooting, also was interviewed.

The gun was taken to the state police crime lab.