A 39-year-old man changed his mind a day before going on trial and has pleaded guilty to firing several gunshots and wounding a police officer outside a home in Brooklyn Park in late 2020 before he was struck by return fire.

Tyrice D. Laws of Crystal pleaded guilty to attempted first-degree murder Tuesday in Hennepin County District Court in connection with the shootout on Dec. 12, 2020, in the 6500 block of N. Georgia Avenue.

The plea agreement calls for Laws to receive a term of 11 years and three months. With credit for time in jail since his arrest, Laws is likely to serve about six years and eight months in prison and the balance on supervised release.

Additional counts of first-degree assault, violation of a court order for protection and a weapons violation would be dropped upon sentencing, scheduled for April 14.

Laws' jury trial was to begin Wednesday before Judge Tamara Garcia.

According to the criminal complaint:

From her surveillance livestream, the mother of Laws' children saw a vehicle pull into her drive while she and her children were elsewhere. Laws called and demanded to see the children.

She called 911 to report he was there, violating of an order of protection. The filing in that case alleged he assaulted her in a hotel room in November 2019, leaving injuries serious enough for her to be taken by ambulance to a nearby hospital.

Two officers arrived in separate squad cars and approached Laws' vehicle from each side. Laws exited his car, crouched and reached into his vehicle before standing. He soon reached down again, drew a handgun and pointed it at one of the officers.

He shot five or six times at one officer. Both officers returned fire. One of them wounded Laws in the arm.

Officer Andrew McComb, an 18-year veteran of the Brooklyn Park Police Department, was taken to a hospital and treated for a gunshot wound.

Laws was arrested "after an extensive law enforcement search," according to a police statement.