The Jennifer Lopez and Ray Liotta police drama Shades of Blue will end after its upcoming third season, NBC announced Wednesday. Season 3 will begin its final 10-episode run on Sunday, June 17.

Although critics were less than enthusiastic about Shades of Blue's quality, Deadline reports Season 2, which aired last summer, saw its live-plus 7-day ratings win its time slot over ABC, CBS, and NBC in every key demographic. That’s adults, men, and women 18-34, 18-49, and 25-54 or, in other words, everything a network wants.

Lopez stars in the drama as Harlee Santos, a single mother and Brooklyn detective working in a team led by Liotta's Lt. Matt Wozniak, who pays no mind to working outside of the law to protect his precinct. Lopez was also an executive producer on the police drama. It’s not a shockingly original premise, but in any case, NBC promises to bring “Lopez’s complex character to a fitting resolution."

“I have enjoyed producing and starring in this beautifully complicated world and playing such an empowering yet flawed character—a woman, a detective but, first and foremost, a mother,” Lopez said in a statement. “Now looking at it with a little distance, playing Harlee strengthened me and helped me grow into a more self-assured woman.”

“It’s crazy how some parts permeate your soul and change you forever, and for that I am grateful,” Lopez added. “We crafted a poetic three-season arc on how her journey ends, which is true redemption. The way only Harlee could have done it—the hard way, the road less traveled. I thank NBC and all the talented actors, writers, crew and producers for going on this journey with us.”

Lopez will remain at the network as the executive producer and star of the reality competition series World of Dance.