Nice work today — and yesterday, and all the preceding days, too, over the course of 12 great seasons.

"Nice work today" — those were the last words uttered by Sgt. (formerly Det.) Andy Sipowicz, one of TV's most unforgettable characters, as "NYPD Blue" (search) ended its long, remarkable run on ABC last night.

With those three words, Sipowicz praised the young detective he'd schooled for the last four seasons, John Clark (Mark-Paul Gosselaar (search)).

They were not the last words heard on "NYPD Blue," however. The honor of speaking the show's last line went not to Dennis Franz (search), but to Gosselaar, who replied, "Good night ... boss."

It was the first time Clark had addressed his former partner that way, in recognition of Sipowicz's promotion to commander of the 15th Precinct's detective unit.

After the last line, though, the final shot belonged, rightfully, to Franz, the show's longest-running and last original cast member, whose characterization of Sipowicz earned him four Emmy Awards and a special place in the hearts of everyone who loves fine television drama.

As Clark exited, Sipowicz was seen settling into his new surroundings — the glassed-in office where three commanding officers (not counting last week's temp) had sat before him.

As the camera pulled back to a wide shot, Sipowicz was seen alone, his office light providing the only beacon in the darkened precinct house.

It was a classy ending — no dreams, surprise tragedies or gimmicks of any kind — just a perfect and touching way to conclude one of TV's best shows.

The message: For the detectives of the 15th, life in the NYPD goes on, except for Medavoy (Gordon Clapp), whose retirement became official last week.

Even the show's sensitive office assistant, John Irvin (Bill Brochtrup), de cided to stay on after putting in for a transfer a week earlier as turmoil hit the unit following the shooting of Lt. Thomas Bale (Currie Graham), this sea son's by-the- books unit chief.

Last night, Bale came by, walking on a cane, to clean out his office.

And in moved Andy Sipowicz, just in time to say good-bye.

For more news, entertainment and sports coverage, click here for NYPost.com.