Jennifer Lopez's 'Shades of Blue' will come to an end after the upcoming third season.

The NBC cop drama - which stars the 48-year-old actress as detective Harlee Santos - has been confirmed to return in June, but the next series will also be its last.

In a statement, the US TV networked said the show would ''conclude after three seasons as the storyline brings Lopez's complex character to a fitting resolution''.

The 'On The Floor' singer - who has also produced the drama since it hit the small screen in 2016 - explained that the role of single mum Harlee has been ''empowering''.

She said: ''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.

In a statement of her own, J-Lo also opened up on how the part has changed her, and admitted she has become ''more self-assured''.

She added: ''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.''

Meanwhile, she said the show itself - which also stars Ray Liotta as Lieutenant Matt Wozniak, and was created by Adi Hasak - will have a fitting end by the end of its third season.

She opened up: ''['Shades of Blue'] 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.''