Goodbye, Detective Nick Amaro!

E! News confirmed that "Law & Order: SVU" actor Danny Pino will be leaving the show as a series regular. Pino, who joined the action drama series in season 13, bid farewell to his character in a near death experience during season 16's finale.

[Spoiler Alert]

In the final minutes of the episode, shots were fired in the courtroom by sex trafficker Johnny D (Charles Halford). Detective Amaro went after the criminal and a shot in the knee and the liver. After a surgery, Amaro dropped the bombshell at Olivia's party celebrating her official adoption of Noah, revealing that he was leaving the NYPD and relocating to the West Coast to be near his family.

Executive producer Warren Leight confirmed in an interview with TV Guide that Pino's character was leaving the series after five seasons.

"It's hard because I'm a hoarder and I adore Danny," Leight said. "But we explored a lot of facts about him and the reality is that the anger he's occasionally been unable to control has put him in a bad place at the NYPD. [Benson] is looking for a No. 2 and he wants it - Finn doesn't want it, Rollins doesn't - and he got shot down very quickly.

"These days, there is so much attention to police abuse of power that a guy like Amaro, who has crossed a line a few times, is basically dead-ended. The best that could happen to a detective like him right now is that they let him play out the string with no possibility of advancement and that didn't seem like something his character would want. His marriage has also fallen apart, but his daughter has moved out West, this other son of his from a prior relationship has moved out West, so there's not much keeping him [in New York]. It seemed to be, in a strange way, right for Amaro to start fresh somewhere else. It's not to say any of us enjoys it, but it seems like that's where the story was going and I think all of the actors felt like the exit was honored."

Pino joined the series following the departure of Christopher Meloni. He tweeted a heartfelt farewell message after Wednesday's finale episode.

"Thank u @nbcsvu @WolfFilms cast, writers, directors, guest casts, crew, editors for 4 fantastic seasons. Grateful for all the #SVUDieHards," Pino tweet read.

Season 17 of "Law and Order: SVU" returns this fall.